home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / VBSamples / DirectShow / Editing / DexterVB / frmMain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-10-08  |  223.5 KB  |  4,795 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  4. Object = "{38911DA0-E448-11D0-84A3-00DD01104159}#1.1#0"; "COMCT332.OCX"
  5. Begin VB.Form frmMain 
  6.    Caption         =   "DexterVB"
  7.    ClientHeight    =   5565
  8.    ClientLeft      =   60
  9.    ClientTop       =   645
  10.    ClientWidth     =   8610
  11.    Icon            =   "frmMain.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    ScaleHeight     =   5565
  15.    ScaleWidth      =   8610
  16.    WhatsThisButton =   -1  'True
  17.    WhatsThisHelp   =   -1  'True
  18.    Begin VB.Timer Timer1 
  19.       Left            =   9300
  20.       Top             =   1140
  21.    End
  22.    Begin MSComctlLib.ImageList ctrlMainToolbarImageListHot 
  23.       Left            =   9300
  24.       Top             =   480
  25.       _ExtentX        =   1005
  26.       _ExtentY        =   1005
  27.       BackColor       =   -2147483643
  28.       ImageWidth      =   16
  29.       ImageHeight     =   15
  30.       MaskColor       =   16711935
  31.       _Version        =   393216
  32.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  33.          NumListImages   =   10
  34.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  35.             Picture         =   "frmMain.frx":030A
  36.             Key             =   ""
  37.          EndProperty
  38.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  39.             Picture         =   "frmMain.frx":062C
  40.             Key             =   ""
  41.          EndProperty
  42.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  43.             Picture         =   "frmMain.frx":094E
  44.             Key             =   ""
  45.          EndProperty
  46.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  47.             Picture         =   "frmMain.frx":0C70
  48.             Key             =   ""
  49.          EndProperty
  50.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  51.             Picture         =   "frmMain.frx":0F62
  52.             Key             =   ""
  53.          EndProperty
  54.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  55.             Picture         =   "frmMain.frx":1254
  56.             Key             =   ""
  57.          EndProperty
  58.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  59.             Picture         =   "frmMain.frx":1546
  60.             Key             =   ""
  61.          EndProperty
  62.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  63.             Picture         =   "frmMain.frx":1838
  64.             Key             =   ""
  65.          EndProperty
  66.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  67.             Picture         =   "frmMain.frx":1B2A
  68.             Key             =   ""
  69.          EndProperty
  70.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  71.             Picture         =   "frmMain.frx":1E1C
  72.             Key             =   ""
  73.          EndProperty
  74.       EndProperty
  75.    End
  76.    Begin ComCtl3.CoolBar ctrlCoolBar 
  77.       Height          =   405
  78.       Left            =   0
  79.       TabIndex        =   3
  80.       Top             =   0
  81.       Width           =   8580
  82.       _ExtentX        =   15134
  83.       _ExtentY        =   714
  84.       BandCount       =   2
  85.       FixedOrder      =   -1  'True
  86.       BandBorders     =   0   'False
  87.       OLEDropMode     =   1
  88.       MousePointer    =   1
  89.       _CBWidth        =   8580
  90.       _CBHeight       =   405
  91.       _Version        =   "6.7.8988"
  92.       MinHeight1      =   345
  93.       NewRow1         =   0   'False
  94.       Child2          =   "tbMain"
  95.       MinHeight2      =   315
  96.       Width2          =   5730
  97.       NewRow2         =   0   'False
  98.       AllowVertical2  =   0   'False
  99.       Begin MSComctlLib.Toolbar tbMain 
  100.          Height          =   315
  101.          Left            =   165
  102.          TabIndex        =   4
  103.          Top             =   45
  104.          Width           =   8325
  105.          _ExtentX        =   14684
  106.          _ExtentY        =   556
  107.          ButtonWidth     =   609
  108.          ButtonHeight    =   556
  109.          AllowCustomize  =   0   'False
  110.          Wrappable       =   0   'False
  111.          Style           =   1
  112.          ImageList       =   "ctrlMainToolbarImageList"
  113.          HotImageList    =   "ctrlMainToolbarImageListHot"
  114.          _Version        =   393216
  115.          BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  116.             NumButtons      =   11
  117.             BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  118.                Key             =   "New"
  119.                Description     =   "New TimeLine"
  120.                Object.ToolTipText     =   "Create A New Timeline"
  121.                ImageIndex      =   1
  122.             EndProperty
  123.             BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  124.                Key             =   "Open"
  125.                Description     =   "Open Timeline"
  126.                Object.ToolTipText     =   "Open An Existing Timeline File"
  127.                ImageIndex      =   2
  128.             EndProperty
  129.             BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  130.                Key             =   "Save"
  131.                Description     =   "Save Timeline"
  132.                Object.ToolTipText     =   "Save The Timeline"
  133.                ImageIndex      =   3
  134.             EndProperty
  135.             BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  136.                Style           =   3
  137.             EndProperty
  138.             BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  139.                Key             =   "Rewind"
  140.                Description     =   "btnRewind"
  141.                Object.ToolTipText     =   "Rewind To Beginning Of TimeLine"
  142.                ImageIndex      =   4
  143.             EndProperty
  144.             BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  145.                Key             =   "SeekBackward"
  146.                Description     =   "btnSeekBack"
  147.                Object.ToolTipText     =   "Seek Backwards One Second At A Time"
  148.                ImageIndex      =   5
  149.             EndProperty
  150.             BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  151.                Key             =   "Play"
  152.                Description     =   "Play"
  153.                Object.ToolTipText     =   "Play Currently Loaded Timeline"
  154.                ImageIndex      =   6
  155.                Style           =   2
  156.             EndProperty
  157.             BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  158.                Key             =   "Pause"
  159.                Description     =   "Pause"
  160.                Object.ToolTipText     =   "Pauses Playback"
  161.                ImageIndex      =   7
  162.                Style           =   2
  163.             EndProperty
  164.             BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  165.                Key             =   "Stop"
  166.                Description     =   "Stop"
  167.                Object.ToolTipText     =   "Stops Playback"
  168.                ImageIndex      =   8
  169.                Style           =   2
  170.             EndProperty
  171.             BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  172.                Key             =   "SeekForward"
  173.                Description     =   "btnSeekFwd"
  174.                Object.ToolTipText     =   "Seek Forward One Second At A Time"
  175.                ImageIndex      =   9
  176.             EndProperty
  177.             BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  178.                Key             =   "FastForward"
  179.                Description     =   "btnffwd"
  180.                Object.ToolTipText     =   "Go To End Of TimeLine"
  181.                ImageIndex      =   10
  182.             EndProperty
  183.          EndProperty
  184.          OLEDropMode     =   1
  185.       End
  186.    End
  187.    Begin MSComctlLib.ListView lstViewInfo 
  188.       Height          =   4745
  189.       Left            =   2475
  190.       TabIndex        =   2
  191.       Top             =   450
  192.       Width           =   6120
  193.       _ExtentX        =   10795
  194.       _ExtentY        =   8361
  195.       View            =   3
  196.       LabelWrap       =   -1  'True
  197.       HideSelection   =   -1  'True
  198.       OLEDropMode     =   1
  199.       FlatScrollBar   =   -1  'True
  200.       FullRowSelect   =   -1  'True
  201.       HotTracking     =   -1  'True
  202.       HoverSelection  =   -1  'True
  203.       _Version        =   393217
  204.       ForeColor       =   -2147483640
  205.       BackColor       =   -2147483643
  206.       Appearance      =   1
  207.       OLEDropMode     =   1
  208.       NumItems        =   0
  209.    End
  210.    Begin MSComctlLib.TreeView tvwSimpleTree 
  211.       Height          =   4745
  212.       Left            =   0
  213.       TabIndex        =   1
  214.       Top             =   450
  215.       Width           =   2415
  216.       _ExtentX        =   4260
  217.       _ExtentY        =   8361
  218.       _Version        =   393217
  219.       HideSelection   =   0   'False
  220.       Style           =   7
  221.       FullRowSelect   =   -1  'True
  222.       HotTracking     =   -1  'True
  223.       ImageList       =   "ctrlTreeViewImageList"
  224.       Appearance      =   1
  225.       OLEDropMode     =   1
  226.    End
  227.    Begin MSComctlLib.ImageList ctrlMainToolbarImageList 
  228.       Left            =   8685
  229.       Top             =   480
  230.       _ExtentX        =   1005
  231.       _ExtentY        =   1005
  232.       BackColor       =   -2147483643
  233.       ImageWidth      =   16
  234.       ImageHeight     =   15
  235.       MaskColor       =   16711935
  236.       _Version        =   393216
  237.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  238.          NumListImages   =   10
  239.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  240.             Picture         =   "frmMain.frx":210E
  241.             Key             =   "new"
  242.          EndProperty
  243.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  244.             Picture         =   "frmMain.frx":2430
  245.             Key             =   "open"
  246.          EndProperty
  247.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  248.             Picture         =   "frmMain.frx":2752
  249.             Key             =   "save"
  250.          EndProperty
  251.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  252.             Picture         =   "frmMain.frx":2A74
  253.             Key             =   "rewind"
  254.          EndProperty
  255.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  256.             Picture         =   "frmMain.frx":2D66
  257.             Key             =   "seekbackward"
  258.          EndProperty
  259.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  260.             Picture         =   "frmMain.frx":3058
  261.             Key             =   "play"
  262.          EndProperty
  263.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  264.             Picture         =   "frmMain.frx":334A
  265.             Key             =   "pause"
  266.          EndProperty
  267.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  268.             Picture         =   "frmMain.frx":363C
  269.             Key             =   "stop"
  270.          EndProperty
  271.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  272.             Picture         =   "frmMain.frx":392E
  273.             Key             =   "seekforward"
  274.          EndProperty
  275.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  276.             Picture         =   "frmMain.frx":3C20
  277.             Key             =   "fastforward"
  278.          EndProperty
  279.       EndProperty
  280.    End
  281.    Begin MSComctlLib.StatusBar sbStatus 
  282.       Align           =   2  'Align Bottom
  283.       Height          =   345
  284.       Left            =   0
  285.       TabIndex        =   0
  286.       Top             =   5220
  287.       Width           =   8610
  288.       _ExtentX        =   15187
  289.       _ExtentY        =   609
  290.       Style           =   1
  291.       _Version        =   393216
  292.       BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
  293.       EndProperty
  294.       OLEDropMode     =   1
  295.    End
  296.    Begin MSComDlg.CommonDialog ctrlCommonDialog 
  297.       Left            =   8700
  298.       Top             =   1080
  299.       _ExtentX        =   847
  300.       _ExtentY        =   847
  301.       _Version        =   393216
  302.    End
  303.    Begin MSComctlLib.ImageList ctrlTreeViewImageList 
  304.       Left            =   9900
  305.       Top             =   480
  306.       _ExtentX        =   1005
  307.       _ExtentY        =   1005
  308.       BackColor       =   -2147483643
  309.       ImageWidth      =   16
  310.       ImageHeight     =   16
  311.       MaskColor       =   12632256
  312.       _Version        =   393216
  313.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  314.          NumListImages   =   3
  315.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  316.             Picture         =   "frmMain.frx":3F12
  317.             Key             =   ""
  318.          EndProperty
  319.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  320.             Picture         =   "frmMain.frx":422C
  321.             Key             =   ""
  322.          EndProperty
  323.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  324.             Picture         =   "frmMain.frx":4546
  325.             Key             =   ""
  326.          EndProperty
  327.       EndProperty
  328.    End
  329.    Begin VB.Menu mnuFile 
  330.       Caption         =   "&File"
  331.       NegotiatePosition=   1  'Left
  332.       Begin VB.Menu mnuFileNew 
  333.          Caption         =   "&New"
  334.          Begin VB.Menu mnuFileNewTimeline 
  335.             Caption         =   "Timeline"
  336.          End
  337.       End
  338.       Begin VB.Menu mnuFileOpen 
  339.          Caption         =   "&Open"
  340.          Shortcut        =   ^O
  341.       End
  342.       Begin VB.Menu mnuFileSeptum 
  343.          Caption         =   "-"
  344.       End
  345.       Begin VB.Menu mnuFileSaveAs 
  346.          Caption         =   "Save &As"
  347.       End
  348.       Begin VB.Menu mnuFileSeptum0 
  349.          Caption         =   "-"
  350.       End
  351.       Begin VB.Menu mnuFileExit 
  352.          Caption         =   "&Exit"
  353.       End
  354.    End
  355.    Begin VB.Menu mnuTimeline 
  356.       Caption         =   "TimeLine"
  357.       Visible         =   0   'False
  358.       Begin VB.Menu mnuTimeLinePlay 
  359.          Caption         =   "Play"
  360.       End
  361.       Begin VB.Menu mnuTimeLineStop 
  362.          Caption         =   "Stop"
  363.       End
  364.       Begin VB.Menu mnuTimeLinePause 
  365.          Caption         =   "Pause"
  366.       End
  367.       Begin VB.Menu mnuTimelineSeptum 
  368.          Caption         =   "-"
  369.       End
  370.       Begin VB.Menu mnuTimelineExpand 
  371.          Caption         =   "Expand"
  372.       End
  373.       Begin VB.Menu mnuTimelineCollapse 
  374.          Caption         =   "Collapse"
  375.       End
  376.       Begin VB.Menu mnuTimelineSeptum2 
  377.          Caption         =   "-"
  378.       End
  379.       Begin VB.Menu mnuTimeLineEdit 
  380.          Caption         =   "Edit"
  381.       End
  382.       Begin VB.Menu mnuTimeLineInsertGroup 
  383.          Caption         =   "Insert Group"
  384.       End
  385.       Begin VB.Menu mnuTimelineSeptum3 
  386.          Caption         =   "-"
  387.       End
  388.       Begin VB.Menu mnuTimeLineRenderTimeLine 
  389.          Caption         =   "Render Timeline"
  390.       End
  391.       Begin VB.Menu mnuTimeLineClearRenderEngine 
  392.          Caption         =   "ClearRenderEngine"
  393.       End
  394.    End
  395.    Begin VB.Menu mnuTrack 
  396.       Caption         =   "Track"
  397.       Visible         =   0   'False
  398.       Begin VB.Menu mnuTrackEdit 
  399.          Caption         =   "Edit"
  400.       End
  401.       Begin VB.Menu mnuTrackDelete 
  402.          Caption         =   "Delete"
  403.       End
  404.       Begin VB.Menu mnuTrackSeptum 
  405.          Caption         =   "-"
  406.       End
  407.       Begin VB.Menu mnuTrackExpand 
  408.          Caption         =   "Expand"
  409.       End
  410.       Begin VB.Menu mnuTrackCollapse 
  411.          Caption         =   "Collapse"
  412.       End
  413.       Begin VB.Menu mnuTrackSeptum2 
  414.          Caption         =   "-"
  415.       End
  416.       Begin VB.Menu mnuTrackAddClip 
  417.          Caption         =   "Add Clip"
  418.       End
  419.       Begin VB.Menu mnuTrackAddEffect 
  420.          Caption         =   "Add Effect"
  421.       End
  422.       Begin VB.Menu mnuTrackAddTransition 
  423.          Caption         =   "Add Transition"
  424.       End
  425.    End
  426.    Begin VB.Menu mnuGroup 
  427.       Caption         =   "group"
  428.       Visible         =   0   'False
  429.       Begin VB.Menu mnuGroupEdit 
  430.          Caption         =   "Edit"
  431.       End
  432.       Begin VB.Menu mnuGroupDelete 
  433.          Caption         =   "Delete"
  434.       End
  435.       Begin VB.Menu mnuGroupSeptum 
  436.          Caption         =   "-"
  437.       End
  438.       Begin VB.Menu mnuGroupExpand 
  439.          Caption         =   "Expand"
  440.       End
  441.       Begin VB.Menu mnuGroupCollapse 
  442.          Caption         =   "Collapse"
  443.       End
  444.       Begin VB.Menu mnuGroupSeptum2 
  445.          Caption         =   "-"
  446.       End
  447.       Begin VB.Menu mnuGroupAddComp 
  448.          Caption         =   "Add Composition"
  449.       End
  450.       Begin VB.Menu mnuGroupAddTrack 
  451.          Caption         =   "Add Track"
  452.       End
  453.       Begin VB.Menu mnuGroupAddTransition 
  454.          Caption         =   "Add Transition"
  455.       End
  456.       Begin VB.Menu mnuGroupAddEffect 
  457.          Caption         =   "Add Effect"
  458.       End
  459.    End
  460.    Begin VB.Menu mnuComp 
  461.       Caption         =   "Comp"
  462.       Visible         =   0   'False
  463.       Begin VB.Menu mnuCompEdit 
  464.          Caption         =   "Edit"
  465.       End
  466.       Begin VB.Menu mnuCompDelete 
  467.          Caption         =   "Delete"
  468.       End
  469.       Begin VB.Menu mnuCompSeptum 
  470.          Caption         =   "-"
  471.       End
  472.       Begin VB.Menu mnuCompExpand 
  473.          Caption         =   "Expand"
  474.       End
  475.       Begin VB.Menu mnuCompCollapse 
  476.          Caption         =   "Collapse"
  477.       End
  478.       Begin VB.Menu mnuCompSeptum2 
  479.          Caption         =   "-"
  480.       End
  481.       Begin VB.Menu mnuCompAddTrack 
  482.          Caption         =   "Add Track"
  483.       End
  484.       Begin VB.Menu mnuCompAddEffect 
  485.          Caption         =   "Add Effect"
  486.       End
  487.       Begin VB.Menu mnuCompAddTransition 
  488.          Caption         =   "Add Transition"
  489.       End
  490.       Begin VB.Menu mnuCompAddComp 
  491.          Caption         =   "Add Composition"
  492.       End
  493.    End
  494.    Begin VB.Menu mnuClip 
  495.       Caption         =   "Clip"
  496.       Visible         =   0   'False
  497.       Begin VB.Menu mnuClipEdit 
  498.          Caption         =   "Edit"
  499.       End
  500.       Begin VB.Menu mnuClipDelete 
  501.          Caption         =   "Delete"
  502.       End
  503.       Begin VB.Menu mnuClipSeptum 
  504.          Caption         =   "-"
  505.       End
  506.       Begin VB.Menu mnuClipExpand 
  507.          Caption         =   "Expand"
  508.       End
  509.       Begin VB.Menu mnuClipCollapse 
  510.          Caption         =   "Collapse"
  511.       End
  512.    End
  513.    Begin VB.Menu mnuTrans 
  514.       Caption         =   "Trans"
  515.       Visible         =   0   'False
  516.       Begin VB.Menu mnuTransEdit 
  517.          Caption         =   "Edit"
  518.       End
  519.       Begin VB.Menu mnuTransDelete 
  520.          Caption         =   "Delete"
  521.       End
  522.       Begin VB.Menu mnuTransSeptum 
  523.          Caption         =   "-"
  524.       End
  525.       Begin VB.Menu mnuTransExpand 
  526.          Caption         =   "Expand"
  527.       End
  528.       Begin VB.Menu mnuTransCollapse 
  529.          Caption         =   "Collapse"
  530.       End
  531.    End
  532.    Begin VB.Menu mnuEffect 
  533.       Caption         =   "Effect"
  534.       Visible         =   0   'False
  535.       Begin VB.Menu mnuEffectEdit 
  536.          Caption         =   "Edit"
  537.       End
  538.       Begin VB.Menu mnuEffectDelete 
  539.          Caption         =   "Delete"
  540.       End
  541.       Begin VB.Menu mnuEffectSeptum 
  542.          Caption         =   "-"
  543.       End
  544.       Begin VB.Menu mnuEffectExpand 
  545.          Caption         =   "Expand"
  546.       End
  547.       Begin VB.Menu mnuEffectCollapse 
  548.          Caption         =   "Collapse"
  549.       End
  550.    End
  551.    Begin VB.Menu mnuHelp 
  552.       Caption         =   "&Help"
  553.       NegotiatePosition=   3  'Right
  554.       Begin VB.Menu mnuHelpAbout 
  555.          Caption         =   "&About"
  556.       End
  557.    End
  558. Attribute VB_Name = "frmMain"
  559. Attribute VB_GlobalNameSpace = False
  560. Attribute VB_Creatable = False
  561. Attribute VB_PredeclaredId = True
  562. Attribute VB_Exposed = False
  563. '*******************************************************************************
  564. '*       This is a part of the Microsoft DXSDK Code Samples.
  565. '*       Copyright (C) 1999-2000 Microsoft Corporation.
  566. '*       All rights reserved.
  567. '*       This source code is only intended as a supplement to
  568. '*       Microsoft Development Tools and/or SDK documentation.
  569. '*       See these sources for detailed information regarding the
  570. '*       Microsoft samples programs.
  571. '*******************************************************************************
  572. Option Explicit
  573. Option Base 0
  574. Option Compare Text
  575. 'module-level drag indicator
  576. Private m_boolDrag As Boolean 'returns true if the user is moving the ide septum divided bar
  577. ' **************************************************************************************************************************************
  578. ' * PRIVATE INTERFACE- FORM EVENT HANDLERS
  579.             ' ******************************************************************************************************************************
  580.             ' * procedure name: Form_Activate
  581.             ' * procedure description:  Occurs when a form becomes the active window.
  582.             ' *
  583.             ' ******************************************************************************************************************************
  584.             Private Sub Form_Activate()
  585.             On Local Error GoTo ErrLine
  586.             Call AppActivate(App.Title, 0)
  587.             Exit Sub
  588.             
  589. ErrLine:
  590.             Err.Clear
  591.             Exit Sub
  592.             End Sub
  593.             
  594.             
  595.             ' ******************************************************************************************************************************
  596.             ' * procedure name: Form_GotFocus
  597.             ' * procedure description:  Occurs when an object receives the focus.
  598.             ' *
  599.             ' ******************************************************************************************************************************
  600.             Private Sub Form_GotFocus()
  601.             On Local Error GoTo ErrLine
  602.             
  603.             'set focus to the treeview
  604.             tvwSimpleTree.SetFocus
  605.             
  606.             'if a node has not been selected set the selected node to root
  607.             If tvwSimpleTree.Nodes.Count > 0 Then
  608.                If Not tvwSimpleTree.SelectedItem Is Nothing Then _
  609.                   Set tvwSimpleTree.SelectedItem = tvwSimpleTree.Nodes(1)
  610.             End If
  611.             Exit Sub
  612.             
  613. ErrLine:
  614.             Err.Clear
  615.             Exit Sub
  616.             End Sub
  617.             
  618.             
  619.             ' ******************************************************************************************************************************
  620.             ' * procedure name: Form_Initialize
  621.             ' * procedure description:  Occurs when an application creates an instance of a Form, MDIForm, or class.
  622.             ' *
  623.             ' ******************************************************************************************************************************
  624.             Private Sub Form_Initialize()
  625.             On Local Error GoTo ErrLine
  626.             
  627.             'initalize module-level variable(s)
  628.             Set gbl_colNormalEnum = New Collection
  629.             Set gbl_objQuartzVB = New VBQuartzHelper
  630.             Exit Sub
  631.             
  632. ErrLine:
  633.             Err.Clear
  634.             Exit Sub
  635.             End Sub
  636.             
  637.             
  638.             ' ******************************************************************************************************************************
  639.             ' * procedure name: Form_Load
  640.             ' * procedure description:  Occurs when a form is loaded.
  641.             ' *
  642.             ' ******************************************************************************************************************************
  643.             Private Sub Form_Load()
  644.             On Local Error GoTo ErrLine
  645.             
  646.             'set the listview to report view
  647.             'and append the column header(s)
  648.             lstViewInfo.View = lvwReport
  649.             lstViewInfo.ColumnHeaders.Add , "Parameter", _
  650.                                                                 "Parameter", (lstViewInfo.Width / 2) - 50
  651.             lstViewInfo.ColumnHeaders.Add , "Value", "Value", (lstViewInfo.Width / 2) - 50
  652.             
  653.             'assign the width of the column header(s)
  654.             If lstViewInfo.ColumnHeaders.Count > 0 Then
  655.                   lstViewInfo.ColumnHeaders(1).Width = lstViewInfo.Width * 0.2
  656.                   If lstViewInfo.ColumnHeaders(2).Width <> _
  657.                      (lstViewInfo.Width - lstViewInfo.ColumnHeaders(1).Width) Then _
  658.                      lstViewInfo.ColumnHeaders(2).Width = _
  659.                      (lstViewInfo.Width - lstViewInfo.ColumnHeaders(1).Width)
  660.             End If
  661.             
  662.             'ensure the listview has zero items
  663.             If lstViewInfo.ListItems.Count <> 0 Then _
  664.                 lstViewInfo.ListItems.Clear
  665.             
  666.            'update the text on the statusbar
  667.            sbStatus.SimpleText = "Ready"
  668.            
  669.            'update the button(s)
  670.            With tbMain.Buttons
  671.               .Item("New").Enabled = True
  672.               .Item("Open").Enabled = True
  673.               .Item("Save").Enabled = False
  674.               .Item("Play").Enabled = False
  675.               .Item("Pause").Enabled = False
  676.               .Item("Stop").Enabled = False
  677.               .Item("Rewind").Enabled = False
  678.               .Item("FastForward").Enabled = False
  679.               .Item("SeekForward").Enabled = False
  680.               .Item("SeekBackward").Enabled = False
  681.            End With
  682.            
  683.             'update the state on the popup context menu
  684.             mnuFileSaveAs.Enabled = False
  685.             mnuTimeLinePlay.Enabled = False
  686.             mnuTimeLineStop.Enabled = False
  687.             mnuTimeLinePause.Enabled = False
  688.             mnuTimeLineRenderTimeLine.Enabled = False
  689.             mnuTimeLineClearRenderEngine.Enabled = False
  690.             Exit Sub
  691.             
  692. ErrLine:
  693.             Err.Clear
  694.             Exit Sub
  695.             End Sub
  696.             
  697.             
  698.             ' ******************************************************************************************************************************
  699.             ' * procedure name: Form_MouseDown
  700.             ' * procedure description:  Occurs when the user presses the mouse button while an object has the focus.
  701.             ' *
  702.             ' ******************************************************************************************************************************
  703.             Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  704.             On Local Error GoTo ErrLine
  705.             
  706.             'check if we are in the septum
  707.             If X > Me.Controls("tvwSimpleTree").Width And X < Me.Controls("lstViewInfo").Left Then
  708.                If Y > Me.Controls("tbMain").Height And Y < Me.Controls("sbStatus").Top Then
  709.                   'we are hovering over the septum bar..
  710.                   If Button = 1 Then
  711.                      m_boolDrag = True
  712.                      If Me.BackColor <> vbBlack Then Me.BackColor = vbBlack
  713.                   End If
  714.                   Exit Sub
  715.                End If
  716.             End If
  717.             Exit Sub
  718.             
  719. ErrLine:
  720.             Err.Clear
  721.             Exit Sub
  722.             End Sub
  723.             
  724.             
  725.             ' ******************************************************************************************************************************
  726.             ' * procedure name: Form_MouseMove
  727.             ' * procedure description:  Occurs when the user moves the mouse.
  728.             ' *
  729.             ' ******************************************************************************************************************************
  730.             Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  731.             On Local Error GoTo ErrLine
  732.             
  733.             'check if we are in the septum; and proceed to set the mousepointer
  734.             If X > Me.Controls("tvwSimpleTree").Width And X < Me.Controls("lstViewInfo").Left Then
  735.                If Y > Me.Controls("tbMain").Height And Y < Me.Controls("sbStatus").Top Then
  736.                   'we are hovering over the septum bar..
  737.                   Me.MousePointer = 9
  738.                Else
  739.                   'otherwise reset
  740.                   Me.MousePointer = vbDefault
  741.                   Me.BackColor = &H8000000F
  742.                End If
  743.             End If
  744.             
  745.             'if we are in 'drag mode' then resize the control(s)
  746.             If m_boolDrag = True And Button = 1 Then
  747.                If X > 65 And X < Me.ScaleWidth - 65 Then Me.Controls("tvwSimpleTree").Width = X
  748.                Call Form_Resize
  749.             End If
  750.             Exit Sub
  751.             
  752. ErrLine:
  753.             Err.Clear
  754.             Exit Sub
  755.             End Sub
  756.             
  757.             
  758.             ' ******************************************************************************************************************************
  759.             ' * procedure name: Form_MouseUp
  760.             ' * procedure description:  Occurs when the user releases the mouse button while an object has the focus.
  761.             ' *
  762.             ' ******************************************************************************************************************************
  763.             Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  764.             On Local Error GoTo ErrLine
  765.             
  766.             'check if we are in the septum
  767.             If X > Me.Controls("tvwSimpleTree").Width And X < Me.Controls("lstViewInfo").Left Then
  768.                If Y > Me.Controls("tbMain").Height And Y < Me.Controls("sbStatus").Top Then
  769.                   'we are hovering over the septum bar..
  770.                   If Button = 1 Then
  771.                      m_boolDrag = False
  772.                      If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  773.                   End If
  774.                   Exit Sub
  775.                End If
  776.             Else
  777.                'reset the mousepointer & septum color
  778.                If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  779.                If Me.MousePointer <> vbDefault Then Me.MousePointer = vbDefault
  780.             End If
  781.             Exit Sub
  782.             
  783. ErrLine:
  784.             Err.Clear
  785.             Exit Sub
  786.             End Sub
  787.             
  788.             
  789.             ' ******************************************************************************************************************************
  790.             ' * procedure name: Form_OLEDragDrop
  791.             ' * procedure description:   Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  792.             ' *
  793.             ' ******************************************************************************************************************************
  794.             Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  795.             On Local Error GoTo ErrLine
  796.             
  797.             'pass to the application drag drop handler
  798.             Call AppOLEDragDrop(Data, Effect, Button, Shift, X, Y)
  799.             Exit Sub
  800.             
  801. ErrLine:
  802.             Err.Clear
  803.             Exit Sub
  804.             End Sub
  805.             
  806.             
  807.             ' ******************************************************************************************************************************
  808.             ' * procedure name: Form_OLEDragOver
  809.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  810.             ' *
  811.             ' ******************************************************************************************************************************
  812.             Private Sub Form_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  813.             On Local Error GoTo ErrLine
  814.             
  815.             'pass to the application drag over handler
  816.             Call AppOLEDragOver(Data, Effect, Button, Shift, X, Y, State)
  817.             Exit Sub
  818.             
  819. ErrLine:
  820.             Err.Clear
  821.             Exit Sub
  822.             End Sub
  823.             
  824.             
  825.             ' ******************************************************************************************************************************
  826.             ' * procedure name: Form_QueryUnload
  827.             ' * procedure description:  Occurs before a form or application closes.
  828.             ' *
  829.             ' ******************************************************************************************************************************
  830.             Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  831.             Dim frm As Form
  832.             On Local Error GoTo ErrLine
  833.             
  834.             Select Case UnloadMode
  835.                 Case vbFormControlMenu
  836.                          '0 The user chose the Close command from the Control menu on the form.
  837.                          For Each frm In Forms
  838.                                frm.Move Screen.Width * -8, Screen.Height * -8
  839.                                frm.Visible = False: Unload frm
  840.                          Next
  841.             
  842.                 Case vbFormCode
  843.                          '1 The Unload statement is invoked from code.
  844.                          Exit Sub
  845.                          
  846.                 Case vbAppWindows
  847.                          '2 The current Microsoft Windows operating environment session is ending.
  848.                          For Each frm In Forms
  849.                                frm.Move Screen.Width * -8, Screen.Height * -8
  850.                                frm.Visible = False: Unload frm
  851.                          Next
  852.                          
  853.                 Case vbAppTaskManager
  854.                          '3 The Microsoft Windows Task Manager is closing the application.
  855.                          For Each frm In Forms
  856.                                frm.Move Screen.Width * -8, Screen.Height * -8
  857.                                frm.Visible = False: Unload frm
  858.                          Next
  859.                          End
  860.                          
  861.                 Case vbFormMDIForm
  862.                          '4 An MDI child form is closing because the MDI form is closing.
  863.                          Exit Sub
  864.                          
  865.                 Case vbFormOwner
  866.                          '5 A form is closing because its owner is closing
  867.                          For Each frm In Forms
  868.                                frm.Move Screen.Width * -8, Screen.Height * -8
  869.                                frm.Visible = False: Unload frm
  870.                          Next
  871.             End Select
  872.             Exit Sub
  873.             
  874. ErrLine:
  875.             Err.Clear
  876.             Exit Sub
  877.             End Sub
  878.             
  879.             
  880.             ' ******************************************************************************************************************************
  881.             ' * procedure name: Form_Resize
  882.             ' * procedure description:  Occurs when a form is first displayed or the size of an object changes.
  883.             ' *
  884.             ' ******************************************************************************************************************************
  885.             Private Sub Form_Resize()
  886.             Dim Septum As Single
  887.             Dim InternalTop As Single
  888.             Dim InternalHeight As Single
  889.             On Local Error GoTo ErrLine
  890.             
  891.             Septum = 65  'assign the septum a specified width
  892.                
  893.             If Me.Controls("ctrlCoolBar").Visible = True And Controls("sbStatus").Visible = True Then
  894.                  'position the coolbar
  895.                  If Me.Controls("ctrlCoolBar").Top <> Me.ScaleTop Then Me.Controls("ctrlCoolBar").Top = Me.ScaleTop
  896.                  If Me.Controls("ctrlCoolBar").Left <> Me.ScaleLeft Then Me.Controls("ctrlCoolBar").Left = Me.ScaleLeft
  897.                  If Me.Controls("ctrlCoolBar").Width <> Me.ScaleWidth Then Me.Controls("ctrlCoolBar").Width = Me.ScaleWidth
  898.                  'get the internal measurement(s)
  899.                  InternalTop = Me.ScaleTop + Me.Controls("ctrlCoolBar").Height
  900.                  InternalHeight = Me.ScaleHeight - (Me.Controls("ctrlCoolBar").Height + Me.Controls("sbStatus").Height)
  901.                  'verify that the measurement(s) are valid
  902.                  If InternalTop < 0 Then InternalTop = 0
  903.                  If InternalHeight < 0 Then InternalHeight = 0
  904.                  
  905.             ElseIf Me.Controls("ctrlCoolBar").Visible = True And Controls("sbStatus").Visible = False Then
  906.                 'position the coolbar
  907.                  If Me.Controls("ctrlCoolBar").Top <> Me.ScaleTop Then Me.Controls("ctrlCoolBar").Top = Me.ScaleTop
  908.                  If Me.Controls("ctrlCoolBar").Left <> Me.ScaleLeft Then Me.Controls("ctrlCoolBar").Left = Me.ScaleLeft
  909.                  If Me.Controls("ctrlCoolBar").Width <> Me.ScaleWidth Then Me.Controls("ctrlCoolBar").Width = Me.ScaleWidth
  910.                  'get the internal measurement(s)
  911.                  InternalTop = Me.ScaleTop + Me.Controls("ctrlCoolBar").Height
  912.                  InternalHeight = Me.ScaleHeight - (Me.Controls("ctrlCoolBar").Height)
  913.                  'verify that the measurement(s) are valid
  914.                  If InternalTop < 0 Then InternalTop = 0
  915.             
  916.             ElseIf Me.Controls("ctrlCoolBar").Visible = False And Me.Controls("sbStatus").Visible = True Then
  917.                  'get the internal measurement(s)
  918.                  InternalTop = Me.ScaleTop
  919.                  InternalHeight = Me.ScaleHeight - (Me.Controls("sbStatus").Height)
  920.                  'verify that the measurement(s) are valid
  921.                  If InternalTop < 0 Then InternalTop = 0
  922.                  If InternalHeight < 0 Then InternalHeight = 0
  923.             
  924.             ElseIf Me.Controls("ctrlCoolBar").Visible = False And Controls("sbStatus").Visible = False Then
  925.                  'get the internal measurement(s)
  926.                  InternalTop = Me.ScaleTop
  927.                  InternalHeight = Me.ScaleHeight
  928.                  'verify that the measurement(s) are valid
  929.                  If InternalTop < 0 Then InternalTop = 0
  930.                  If InternalHeight < 0 Then InternalHeight = 0
  931.             End If
  932.             
  933.                
  934.             If Me.Controls("tvwSimpleTree").Visible = True And Controls("lstViewInfo").Visible = False Then
  935.                 'position the treeview
  936.                 If Me.Controls("tvwSimpleTree").Top <> InternalTop Then Me.Controls("tvwSimpleTree").Top = InternalTop
  937.                 If Me.Controls("tvwSimpleTree").Left <> 0 Then Me.Controls("tvwSimpleTree").Left = 0
  938.                 If Me.Controls("tvwSimpleTree").Height <> InternalHeight Then Me.Controls("tvwSimpleTree").Height = InternalHeight
  939.                 'position the listview
  940.                 If Me.Controls("lstViewInfo").Top <> InternalTop Then Me.Controls("lstViewInfo").Top = InternalTop
  941.                 If (Me.Controls("lstViewInfo").Left + Me.Controls("tvwSimpleTree").Width) + Septum > 0 Then Me.Controls("lstViewInfo").Left = (Me.Controls("tvwSimpleTree").Left + Me.Controls("tvwSimpleTree").Width) + Septum
  942.                 If Me.Controls("lstViewInfo").Height <> InternalHeight Then Me.Controls("lstViewInfo").Height = InternalHeight
  943.                 If (Me.ScaleWidth - Me.Controls("lstViewInfo").Width) - Septum > 0 Then Me.Controls("lstViewInfo").Width = (Me.ScaleWidth - Me.Controls("tvwSimpleTree").Width) - Septum
  944.             
  945.             ElseIf Me.Controls("tvwSimpleTree").Visible = True And Controls("lstViewInfo").Visible = True Then
  946.                'position the treeview
  947.                 If Me.Controls("tvwSimpleTree").Top <> InternalTop Then Me.Controls("tvwSimpleTree").Top = InternalTop
  948.                 If Me.Controls("tvwSimpleTree").Left <> 0 Then Me.Controls("tvwSimpleTree").Left = 0
  949.                 If Me.Controls("tvwSimpleTree").Height <> InternalHeight Then Me.Controls("tvwSimpleTree").Height = InternalHeight
  950.                'position the listview
  951.                 If Me.Controls("lstViewInfo").Top <> InternalTop Then Me.Controls("lstViewInfo").Top = InternalTop
  952.                 If (Me.Controls("lstViewInfo").Left + Me.Controls("tvwSimpleTree").Width) + Septum > 0 Then Me.Controls("lstViewInfo").Left = (Me.Controls("tvwSimpleTree").Left + Me.Controls("tvwSimpleTree").Width) + Septum
  953.                 If Me.Controls("lstViewInfo").Height <> InternalHeight Then Me.Controls("lstViewInfo").Height = InternalHeight
  954.                 If (Me.ScaleWidth - Me.Controls("lstViewInfo").Width) - Septum > 0 Then Me.Controls("lstViewInfo").Width = (Me.ScaleWidth - Me.Controls("tvwSimpleTree").Width) - Septum
  955.                
  956.             ElseIf Me.Controls("tvwSimpleTree").Visible = False And Controls("lstViewInfo").Visible = True Then
  957.                 'position the treeview
  958.                 If Me.Controls("lstViewInfo").Top <> InternalTop Then Me.Controls("lstViewInfo").Top = InternalTop
  959.                 If Me.Controls("lstViewInfo").Left <> 0 Then Me.Controls("lstViewInfo").Left = 0
  960.                 If Me.Controls("lstViewInfo").Height <> InternalHeight Then Me.Controls("lstViewInfo").Height = InternalHeight
  961.             
  962.             ElseIf Me.Controls("tvwSimpleTree").Visible = False And Controls("lstViewInfo").Visible = False Then
  963.                 Exit Sub
  964.             End If
  965.             
  966.             'ensure listview's column headers get resized as well..
  967.             If lstViewInfo.Visible Then
  968.                If lstViewInfo.ColumnHeaders.Count > 0 Then
  969.                   If lstViewInfo.ColumnHeaders(2).Width <> (lstViewInfo.Width - lstViewInfo.ColumnHeaders(1).Width) Then _
  970.                      lstViewInfo.ColumnHeaders(2).Width = (lstViewInfo.Width - lstViewInfo.ColumnHeaders(1).Width)
  971.                End If
  972.             End If
  973.             Exit Sub
  974.             
  975. ErrLine:
  976.             Err.Clear
  977.             Exit Sub
  978.             End Sub
  979.             
  980.             
  981.             ' ******************************************************************************************************************************
  982.             ' * procedure name: Form_Terminate
  983.             ' * procedure description:  Occurs when all references to an instance of a Form, MDIForm, or class are removed from memory.
  984.             ' *
  985.             ' ******************************************************************************************************************************
  986.             Private Sub Form_Terminate()
  987.             On Local Error GoTo ErrLine
  988.             
  989.             'dereference & clean-up module-level data
  990.             If Not gbl_objQuartzVB Is Nothing Then Set gbl_objQuartzVB = Nothing
  991.             If Not gbl_colNormalEnum Is Nothing Then Set gbl_colNormalEnum = Nothing
  992.             
  993.             'dereference & clean-up application-level data
  994.             If Not gbl_objTimeline Is Nothing Then Set gbl_objTimeline = Nothing
  995.             If Not gbl_objFilterGraph Is Nothing Then Set gbl_objFilterGraph = Nothing
  996.             If Not gbl_objDexterObject Is Nothing Then Set gbl_objDexterObject = Nothing
  997.             If Not gbl_objRenderEngine Is Nothing Then Set gbl_objRenderEngine = Nothing
  998.             Exit Sub
  999.             
  1000. ErrLine:
  1001.             Err.Clear
  1002.             Exit Sub
  1003.             End Sub
  1004.             
  1005.             
  1006.             ' ******************************************************************************************************************************
  1007.             ' * procedure name: Form_Unload
  1008.             ' * procedure description:  Occurs when a form is about to be removed from the screen.
  1009.             ' *
  1010.             ' ******************************************************************************************************************************
  1011.             Private Sub Form_Unload(Cancel As Integer)
  1012.             On Local Error GoTo ErrLine
  1013.             With Me
  1014.                .Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
  1015.             End With
  1016.             Exit Sub
  1017.             
  1018. ErrLine:
  1019.             Err.Clear
  1020.             Exit Sub
  1021.             End Sub
  1022. ' **************************************************************************************************************************************
  1023. ' * PRIVATE INTERFACE- MENU EVENT HANDLERS
  1024.             ' ******************************************************************************************************************************
  1025.             ' * procedure name: mnuClip_Click
  1026.             ' * procedure description:  Occurs when the clip popup context menu is invoked
  1027.             ' *
  1028.             ' ******************************************************************************************************************************
  1029.             Private Sub mnuClip_Click()
  1030.             On Local Error GoTo ErrLine
  1031.             
  1032.             'set menu state
  1033.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  1034.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  1035.                   If mnuClipExpand.Enabled = True Then mnuClipExpand.Enabled = False
  1036.                   If mnuClipCollapse.Enabled = True Then mnuClipCollapse.Enabled = False
  1037.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  1038.                   If mnuClipExpand.Enabled = True Then mnuClipExpand.Enabled = False
  1039.                   If mnuClipCollapse.Enabled = False Then mnuClipCollapse.Enabled = True
  1040.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  1041.                   If mnuClipExpand.Enabled = False Then mnuClipExpand.Enabled = True
  1042.                   If mnuClipCollapse.Enabled = True Then mnuClipCollapse.Enabled = False
  1043.                Else
  1044.                   If mnuClipExpand.Enabled = True Then mnuClipExpand.Enabled = False
  1045.                   If mnuClipCollapse.Enabled = True Then mnuClipCollapse.Enabled = False
  1046.                End If
  1047.             End If
  1048.             Exit Sub
  1049.             
  1050. ErrLine:
  1051.             Err.Clear
  1052.             Exit Sub
  1053.             End Sub
  1054.             
  1055.             
  1056.             ' ******************************************************************************************************************************
  1057.             ' * procedure name: mnuClipCollapse_Click
  1058.             ' * procedure description:  Occurs when the clip popup context menu's 'Collapse' option is elected
  1059.             ' *
  1060.             ' ******************************************************************************************************************************
  1061.             Private Sub mnuClipCollapse_Click()
  1062.             On Local Error GoTo ErrLine
  1063.             
  1064.             'collapse the treeview
  1065.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  1066.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  1067.                   tvwSimpleTree.SelectedItem.Expanded = False
  1068.                   If mnuClipExpand.Enabled = False Then mnuClipExpand.Enabled = True
  1069.                   If mnuClipCollapse.Enabled = True Then mnuClipCollapse.Enabled = False
  1070.                End If
  1071.             End If
  1072.             Exit Sub
  1073.             
  1074. ErrLine:
  1075.             Err.Clear
  1076.             Exit Sub
  1077.             End Sub
  1078.             
  1079.             
  1080.             ' ******************************************************************************************************************************
  1081.             ' * procedure name: mnuClipExpand_Click
  1082.             ' * procedure description:  Occurs when the clip popup context menu's 'Expand' option is elected
  1083.             ' *
  1084.             ' ******************************************************************************************************************************
  1085.             Private Sub mnuClipExpand_Click()
  1086.             On Local Error GoTo ErrLine
  1087.             
  1088.             'expand the treeview
  1089.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  1090.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  1091.                   tvwSimpleTree.SelectedItem.Expanded = True
  1092.                   If mnuClipExpand.Enabled = True Then mnuClipExpand.Enabled = False
  1093.                   If mnuClipCollapse.Enabled = False Then mnuClipCollapse.Enabled = True
  1094.                End If
  1095.             End If
  1096.             Exit Sub
  1097.             
  1098. ErrLine:
  1099.             Err.Clear
  1100.             Exit Sub
  1101.             End Sub
  1102.             ' ******************************************************************************************************************************
  1103.             ' * procedure name: mnuClipDelete_Click
  1104.             ' * procedure description:  Occurs when the clip popup context menu's 'Delete' option is elected
  1105.             ' *
  1106.             ' ******************************************************************************************************************************
  1107.             Private Sub mnuClipDelete_Click()
  1108.             Dim objSource As AMTimelineSrc
  1109.             On Local Error GoTo ErrLine
  1110.             
  1111.             'obtain the source from the global timeline object
  1112.             'which is reset when the user clicks a node on the tree
  1113.             If Not gbl_objDexterObject Is Nothing Then
  1114.                Set objSource = gbl_objDexterObject
  1115.             Else: Exit Sub
  1116.             End If
  1117.             
  1118.             'remove the item
  1119.             Call gbl_objDexterObject.RemoveAll
  1120.             Call gbl_colNormalEnum.Remove(tvwSimpleTree.SelectedItem.Key)
  1121.             Call tvwSimpleTree.Nodes.Remove(tvwSimpleTree.SelectedItem.Index)
  1122.             If Not gbl_objDexterObject Is Nothing Then Set gbl_objDexterObject = Nothing
  1123.             
  1124.             'clean-up & dereference
  1125.             If Not objSource Is Nothing Then Set objSource = Nothing
  1126.             Exit Sub
  1127.             
  1128. ErrLine:
  1129.             Err.Clear
  1130.             Exit Sub
  1131.             End Sub
  1132.             
  1133.             
  1134.             ' ******************************************************************************************************************************
  1135.             ' * procedure name: mnuClipEdit_Click
  1136.             ' * procedure description:  Occurs when the clip popup context menu's 'Edit' option is elected
  1137.             ' *
  1138.             ' ******************************************************************************************************************************
  1139.             Private Sub mnuClipEdit_Click()
  1140.             Dim nMuted As Long
  1141.             Dim dblTStart As Double
  1142.             Dim dblTStop As Double
  1143.             Dim dblMStart As Double
  1144.             Dim dblMStop As Double
  1145.             Dim nStretchMode As Long
  1146.             Dim nStreamNumber As Long
  1147.             Dim dblDefaultFPS As Double
  1148.             Dim dblMediaLength As Double
  1149.             Dim bstrClipMediaName As String
  1150.             Dim objSourceClip As AMTimelineSrc
  1151.             On Local Error GoTo ErrLine
  1152.             
  1153.             'obtain the source from the global timeline object
  1154.             'which is reset when the user clicks a node on the tree
  1155.             If Not gbl_objDexterObject Is Nothing Then
  1156.                Set objSourceClip = gbl_objDexterObject
  1157.             Else: Exit Sub
  1158.             End If
  1159.             
  1160.             'obtain existing group information
  1161.             If Not objSourceClip Is Nothing Then
  1162.                With objSourceClip
  1163.                   'get media name
  1164.                   bstrClipMediaName = .GetMediaName
  1165.                   'get dexter start & stop times
  1166.                   Call gbl_objDexterObject.GetStartStop2(dblTStart, dblTStop)
  1167.                   'get media start & stop times
  1168.                   Call .GetMediaTimes2(dblMStart, dblMStop)
  1169.                   'get medialength
  1170.                   dblMediaLength = (dblMStop - dblMStart)
  1171.                   'get stream number
  1172.                   Call .GetStreamNumber(nStreamNumber)
  1173.                   'get default fps
  1174.                   Call .GetDefaultFPS(dblDefaultFPS)
  1175.                   'get stretch mode
  1176.                   Call .GetStretchMode(nStretchMode)
  1177.                   'get muted
  1178.                   Call gbl_objDexterObject.GetMuted(nMuted)
  1179.                End With
  1180.             End If
  1181.             
  1182.             'hide the dialog
  1183.             Load frmClip
  1184.             frmClip.Visible = False
  1185.             
  1186.             'update the form with the existing information
  1187.             With frmClip
  1188.                .txtMediaName = CStr(bstrClipMediaName)
  1189.                .txtMStart = CStr(dblMStart)
  1190.                .txtMStop = CStr(dblMStop)
  1191.                .txtTStart = CStr(dblTStart)
  1192.                .txtTStop = CStr(dblTStop)
  1193.                .txtMediaLength = CStr(dblMediaLength)
  1194.                .txtStreamNumber = CStr(nStreamNumber)
  1195.                .txtFPS = CStr(dblDefaultFPS)
  1196.                .txtStretchMode = CStr(nStretchMode)
  1197.                .txtMuted = CStr(nMuted)
  1198.             End With
  1199.             
  1200.             'display the dialog
  1201.             frmClip.Caption = "Edit Source"
  1202.             frmClip.Show vbModal, Me
  1203.             
  1204.             'wait until the user closes the dialog
  1205.             Do Until frmClip.Visible = False: DoEvents
  1206.             Loop
  1207.             'verify unload mode
  1208.             If frmClip.UnloadMode = 1 Then
  1209.                Unload frmClip: Set frmClip = Nothing: Exit Sub
  1210.             End If
  1211.             
  1212.             'update the timeline info given the new information
  1213.             With objSourceClip
  1214.                'set the media name
  1215.                If frmClip.txtMediaName.Text <> vbNullString Then
  1216.                   Call .SetMediaName(CStr(frmClip.txtMediaName.Text))
  1217.                End If
  1218.                'set the media times
  1219.                If IsNumeric(frmClip.txtMStart.Text) Then
  1220.                   Call .SetMediaTimes2(CDbl(frmClip.txtMStart.Text), CDbl(frmClip.txtMStop.Text))
  1221.                End If
  1222.                'set the media length
  1223.                If IsNumeric(frmClip.txtMStop.Text) Then
  1224.                   Call .SetMediaLength2(CDbl(frmClip.txtTStop.Text) - CDbl(frmClip.txtTStart.Text))
  1225.                End If
  1226.                'set stream number
  1227.                If IsNumeric(frmClip.txtStreamNumber.Text) Then
  1228.                   Call .SetStreamNumber(CLng(frmClip.txtStreamNumber.Text))
  1229.                End If
  1230.                'set default frames per second
  1231.                If IsNumeric(frmClip.txtFPS.Text) Then
  1232.                   Call .SetDefaultFPS(CDbl(frmClip.txtFPS.Text))
  1233.                End If
  1234.                'set stretch mode
  1235.                If IsNumeric(frmClip.txtStretchMode.Text) Then
  1236.                   Call .SetStretchMode(CLng(frmClip.txtStretchMode.Text))
  1237.                End If
  1238.                'set muted state
  1239.                If IsNumeric(frmClip.txtMuted.Text) Then
  1240.                   Call gbl_objDexterObject.SetMuted(CLng(frmClip.txtMuted.Text))
  1241.                End If
  1242.             End With
  1243.             
  1244.             'refresh the ide
  1245.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1246.             
  1247.             'destroy the dialog
  1248.             Unload frmClip: Set frmClip = Nothing
  1249.             Exit Sub
  1250.             
  1251. ErrLine:
  1252.             Err.Clear
  1253.             Exit Sub
  1254.             End Sub
  1255.             
  1256.             ' ******************************************************************************************************************************
  1257.             ' * procedure name: mnuComp_Click
  1258.             ' * procedure description:  Occurs when the composition popup context menu is invoked
  1259.             ' *
  1260.             ' ******************************************************************************************************************************
  1261.             Private Sub mnuComp_Click()
  1262.             On Local Error GoTo ErrLine
  1263.             
  1264.             'set menu state
  1265.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  1266.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  1267.                   If mnuCompExpand.Enabled = True Then mnuCompExpand.Enabled = False
  1268.                   If mnuCompCollapse.Enabled = True Then mnuCompCollapse.Enabled = False
  1269.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  1270.                   If mnuCompExpand.Enabled = True Then mnuCompExpand.Enabled = False
  1271.                   If mnuCompCollapse.Enabled = False Then mnuCompCollapse.Enabled = True
  1272.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  1273.                   If mnuCompExpand.Enabled = False Then mnuCompExpand.Enabled = True
  1274.                   If mnuCompCollapse.Enabled = True Then mnuCompCollapse.Enabled = False
  1275.                Else
  1276.                   If mnuCompExpand.Enabled = True Then mnuCompExpand.Enabled = False
  1277.                   If mnuCompCollapse.Enabled = True Then mnuCompCollapse.Enabled = False
  1278.                End If
  1279.             End If
  1280.             Exit Sub
  1281.             
  1282. ErrLine:
  1283.             Err.Clear
  1284.             Exit Sub
  1285.             End Sub
  1286.             
  1287.             
  1288.             ' ******************************************************************************************************************************
  1289.             ' * procedure name: mnuCompCollapse_Click
  1290.             ' * procedure description:  Occurs when the composition popup context menu's 'Collapse' option is elected
  1291.             ' *
  1292.             ' ******************************************************************************************************************************
  1293.             Private Sub mnuCompCollapse_Click()
  1294.             On Local Error GoTo ErrLine
  1295.             
  1296.             'collapse the treeview
  1297.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  1298.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  1299.                   tvwSimpleTree.SelectedItem.Expanded = False
  1300.                   If mnuCompExpand.Enabled = False Then mnuCompExpand.Enabled = True
  1301.                   If mnuCompCollapse.Enabled = True Then mnuCompCollapse.Enabled = False
  1302.                End If
  1303.             End If
  1304.             Exit Sub
  1305.             
  1306. ErrLine:
  1307.             Err.Clear
  1308.             Exit Sub
  1309.             End Sub
  1310.             
  1311.             
  1312.             ' ******************************************************************************************************************************
  1313.             ' * procedure name: mnuCompExpand_Click
  1314.             ' * procedure description:  Occurs when the composition popup context menu's 'Expand' option is elected
  1315.             ' *
  1316.             ' ******************************************************************************************************************************
  1317.             Private Sub mnuCompExpand_Click()
  1318.             On Local Error GoTo ErrLine
  1319.             
  1320.             'expand the treeview
  1321.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  1322.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  1323.                   tvwSimpleTree.SelectedItem.Expanded = True
  1324.                   If mnuCompExpand.Enabled = True Then mnuCompExpand.Enabled = False
  1325.                   If mnuCompCollapse.Enabled = False Then mnuCompCollapse.Enabled = True
  1326.                End If
  1327.             End If
  1328.             Exit Sub
  1329.             
  1330. ErrLine:
  1331.             Err.Clear
  1332.             Exit Sub
  1333.             End Sub
  1334.             
  1335.             
  1336.             ' ******************************************************************************************************************************
  1337.             ' * procedure name: mnuCompAddComp_Click
  1338.             ' * procedure description:  Occurs when the composition popup context menu's 'Add Composition' option is elected
  1339.             ' *
  1340.             ' ******************************************************************************************************************************
  1341.             Private Sub mnuCompAddComp_Click()
  1342.             Dim nPriority As Long
  1343.             Dim dblStartTime As Double
  1344.             Dim dblStopTime As Double
  1345.             Dim objNewComposite As AMTimelineComp
  1346.             On Local Error GoTo ErrLine
  1347.             
  1348.             'display the dialog
  1349.             frmComp.Caption = "Add Composition"
  1350.             frmComp.Show vbModal, Me
  1351.             
  1352.             'wait until the user closes the dialog
  1353.             Do Until frmComp.Visible = False: DoEvents
  1354.             Loop
  1355.             'verify unload mode
  1356.             If frmComp.UnloadMode = 1 Then
  1357.                Unload frmComp: Set frmComp = Nothing: Exit Sub
  1358.             End If
  1359.             
  1360.             'query the dialog for user input
  1361.             With frmComp
  1362.                nPriority = CLng(.txtPriority.Text)
  1363.                dblStartTime = CDbl(.txtStartTime.Text)
  1364.                dblStopTime = CDbl(.txtStopTime.Text)
  1365.             End With
  1366.             
  1367.             'insert the composite into the timeline
  1368.             If Not gbl_objTimeline Is Nothing Then
  1369.                Set objNewComposite = CreateComposite(gbl_objTimeline)
  1370.                If Not objNewComposite Is Nothing Then Call InsertComposite(objNewComposite, gbl_objDexterObject)
  1371.                If Not gbl_objDexterObject Is Nothing Then Call gbl_objDexterObject.SetStartStop2(dblStartTime, dblStopTime)
  1372.                'refresh the ide
  1373.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1374.             End If
  1375.             
  1376.             'unload the dialog
  1377.             Unload frmComp: Set frmComp = Nothing
  1378.             Exit Sub
  1379.             
  1380. ErrLine:
  1381.             Err.Clear
  1382.             Exit Sub
  1383.             End Sub
  1384.             
  1385.             
  1386.             ' ******************************************************************************************************************************
  1387.             ' * procedure name: mnuCompAddEffect_Click
  1388.             ' * procedure description:  Occurs when the composition popup context menu's 'Add Effect' option is elected
  1389.             ' *
  1390.             ' ******************************************************************************************************************************
  1391.             Private Sub mnuCompAddEffect_Click()
  1392.             Dim nEffectPriority As Long
  1393.             Dim bstrEffectGUID As String
  1394.             Dim dblEffectStopTime As Double
  1395.             Dim dblEffectStartTime As Double
  1396.             Dim objNewEffect As AMTimelineEffect
  1397.             Dim objTimelineObject As AMTimelineObj
  1398.             On Local Error GoTo ErrLine
  1399.             
  1400.             'display the insert effect dialog
  1401.             frmEffect.Caption = "Add Effect"
  1402.             frmEffect.Show vbModal, Me
  1403.             
  1404.             'wait until the user closes the dialog
  1405.             Do: DoEvents
  1406.             If frmEffect.Visible = False Then Exit Do
  1407.             Loop
  1408.             'verify unload mode
  1409.             If frmEffect.UnloadMode = 1 Then
  1410.                Unload frmEffect: Set frmEffect = Nothing: Exit Sub
  1411.             End If
  1412.             
  1413.             'query the dialog information
  1414.             With frmEffect
  1415.                If IsNumeric(.txtStartTime.Text) Then
  1416.                   dblEffectStartTime = CDbl(.txtStartTime.Text)
  1417.                End If
  1418.                If IsNumeric(.txtStopTime.Text) Then
  1419.                   dblEffectStopTime = CDbl(.txtStopTime.Text)
  1420.                End If
  1421.                If IsNumeric(.txtPriority.Text) Then
  1422.                   nEffectPriority = CLng(.txtPriority.Text)
  1423.                End If
  1424.                If .cmbEffect.Text <> vbNullString Then
  1425.                   bstrEffectGUID = CStr(.cmbEffect.Text)
  1426.                End If
  1427.             End With
  1428.             
  1429.             'insert the effect into the timeline
  1430.             If Not gbl_objTimeline Is Nothing Then
  1431.                Set objNewEffect = CreateEffect(gbl_objTimeline)
  1432.                If Not objNewEffect Is Nothing Then Call InsertEffect(objNewEffect, gbl_objDexterObject, EffectFriendlyNameToCLSID(bstrEffectGUID), dblEffectStartTime, dblEffectStopTime)
  1433.                'refresh the ide
  1434.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1435.             End If
  1436.             
  1437.             'destroy the dialog
  1438.             Unload frmEffect: Set frmEffect = Nothing
  1439.             Exit Sub
  1440.             
  1441. ErrLine:
  1442.             Err.Clear
  1443.             Exit Sub
  1444.             End Sub
  1445.             
  1446.             
  1447.             ' ******************************************************************************************************************************
  1448.             ' * procedure name: mnuCompAddTrack_Click
  1449.             ' * procedure description:  Occurs when the composition popup context menu's 'Add Track' option is elected
  1450.             ' *
  1451.             ' ******************************************************************************************************************************
  1452.             Private Sub mnuCompAddTrack_Click()
  1453.             Dim nBlank As Long
  1454.             Dim nMuted As Long
  1455.             Dim nPriority As Long
  1456.             Dim dblStartTime As Double
  1457.             Dim dblStopTime As Double
  1458.             Dim objNewTrack As AMTimelineTrack
  1459.             On Local Error GoTo ErrLine
  1460.             
  1461.             'display the dialog
  1462.             frmTrack.Caption = "Add Track"
  1463.             frmTrack.Show vbModal, Me
  1464.             
  1465.             'wait until the user closes the dialog
  1466.             Do Until frmTrack.Visible = False: DoEvents
  1467.             Loop
  1468.             'verify unload mode
  1469.             If frmTrack.UnloadMode = 1 Then
  1470.                Unload frmTrack: Set frmTrack = Nothing: Exit Sub
  1471.             End If
  1472.             
  1473.             'obtain the user input from the dialog
  1474.             With frmTrack
  1475.                If IsNumeric(.txtBlank.Text) Then
  1476.                   nBlank = CLng(.txtBlank.Text)
  1477.                End If
  1478.                If IsNumeric(.txtMuted.Text) Then
  1479.                   nMuted = CLng(.txtMuted.Text)
  1480.                End If
  1481.                If IsNumeric(.txtMuted.Text) Then
  1482.                   nPriority = CLng(.txtMuted.Text)
  1483.                End If
  1484.                If IsNumeric(.txtStartTime.Text) Then
  1485.                   dblStartTime = CDbl(.txtStartTime.Text)
  1486.                End If
  1487.                If IsNumeric(.txtStopTime.Text) Then
  1488.                   dblStopTime = CDbl(.txtStopTime.Text)
  1489.                End If
  1490.             End With
  1491.             
  1492.             'insert the track into the timeline
  1493.             If Not gbl_objTimeline Is Nothing Then
  1494.                Set objNewTrack = CreateTrack(gbl_objTimeline)
  1495.                If Not objNewTrack Is Nothing Then Call InsertTrack(objNewTrack, gbl_objDexterObject, nPriority)
  1496.                'refresh the ide
  1497.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1498.             End If
  1499.             
  1500.             'destroy dialog
  1501.             Unload frmTrack: Set frmTrack = Nothing
  1502.             Exit Sub
  1503.             
  1504. ErrLine:
  1505.             Err.Clear
  1506.             Exit Sub
  1507.             End Sub
  1508.             
  1509.             
  1510.             ' ******************************************************************************************************************************
  1511.             ' * procedure name: mnuCompAddTransition_Click
  1512.             ' * procedure description:  Occurs when the composition popup context menu's 'Add Transition' option is elected
  1513.             ' *
  1514.             ' ******************************************************************************************************************************
  1515.             Private Sub mnuCompAddTransition_Click()
  1516.             Dim nCutpoint As Long
  1517.             Dim nCutsOnly As Long
  1518.             Dim nSwapInputs As Long
  1519.             Dim bstrTransition As String
  1520.             Dim dblStartTime As Double
  1521.             Dim dblStopTime As Double
  1522.             Dim objNewTransition As AMTimelineTrans
  1523.             On Local Error GoTo ErrLine
  1524.             
  1525.             'display the dialog
  1526.             frmTransitions.Caption = "Add Transition"
  1527.             frmTransitions.Show vbModal, Me
  1528.             
  1529.             'wait until the user closes the dialog
  1530.             Do Until frmTransitions.Visible = False: DoEvents
  1531.             Loop
  1532.             'verify unload mode
  1533.             If frmTransitions.UnloadMode = 1 Then
  1534.                Unload frmTransitions: Set frmTransitions = Nothing: Exit Sub
  1535.             End If
  1536.             
  1537.             'obtain user input
  1538.             With frmTransitions
  1539.                If IsNumeric(.txtCutpoint.Text) Then
  1540.                   nCutpoint = CLng(.txtCutpoint.Text)
  1541.                End If
  1542.                If IsNumeric(.txtCutsOnly.Text) Then
  1543.                   nCutsOnly = CLng(.txtCutsOnly.Text)
  1544.                End If
  1545.                If IsNumeric(.txtSwapInputs.Text) Then
  1546.                   nSwapInputs = CLng(.txtSwapInputs.Text)
  1547.                End If
  1548.                If IsNumeric(.txtStartTime.Text) Then
  1549.                   dblStartTime = CDbl(.txtStartTime.Text)
  1550.                End If
  1551.                If IsNumeric(.txtStopTime.Text) Then
  1552.                   dblStopTime = CDbl(.txtStopTime.Text)
  1553.                End If
  1554.                If .cmbTransition.Text <> vbNullString Then
  1555.                   bstrTransition = CStr(.cmbTransition.Text)
  1556.                End If
  1557.             End With
  1558.             
  1559.             'insert the transition into the timeline
  1560.             If Not gbl_objTimeline Is Nothing Then
  1561.                Set objNewTransition = CreateTransition(gbl_objTimeline)
  1562.                If Not objNewTransition Is Nothing Then Call InsertTransition(objNewTransition, gbl_objDexterObject, TransitionFriendlyNameToCLSID(bstrTransition), dblStartTime, dblStopTime)
  1563.                'refresh the ide
  1564.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1565.             End If
  1566.             
  1567.             'destroy the dialog
  1568.             Unload frmTransitions: Set frmTransitions = Nothing
  1569.             Exit Sub
  1570.             
  1571. ErrLine:
  1572.             Err.Clear
  1573.             Exit Sub
  1574.             End Sub
  1575.             
  1576.             
  1577.             ' ******************************************************************************************************************************
  1578.             ' * procedure name: mnuCompDelete_Click
  1579.             ' * procedure description:  Occurs when the composition popup context menu's 'Delete' option is elected
  1580.             ' *
  1581.             ' ******************************************************************************************************************************
  1582.             Private Sub mnuCompDelete_Click()
  1583.             Dim objComposition As AMTimelineComp
  1584.             On Local Error GoTo ErrLine
  1585.             
  1586.             'obtain the composition from the global timeline object
  1587.             'which is reset when the user clicks a node on the tree
  1588.             If Not gbl_objDexterObject Is Nothing Then
  1589.                Set objComposition = gbl_objDexterObject
  1590.             Else: Exit Sub
  1591.             End If
  1592.             
  1593.             'remove the item
  1594.             Call gbl_objDexterObject.RemoveAll
  1595.             Call gbl_colNormalEnum.Remove(tvwSimpleTree.SelectedItem.Key)
  1596.             Call tvwSimpleTree.Nodes.Remove(tvwSimpleTree.SelectedItem.Index)
  1597.             If Not gbl_objDexterObject Is Nothing Then Set gbl_objDexterObject = Nothing
  1598.             
  1599.             'clean-up & dereference
  1600.             If Not objComposition Is Nothing Then Set objComposition = Nothing
  1601.             Exit Sub
  1602.             
  1603. ErrLine:
  1604.             Err.Clear
  1605.             Exit Sub
  1606.             End Sub
  1607.             
  1608.             
  1609.             ' ******************************************************************************************************************************
  1610.             ' * procedure name: mnuCompEdit_Click
  1611.             ' * procedure description:  Occurs when the composition popup context menu's 'Edit' option is elected
  1612.             ' *
  1613.             ' ******************************************************************************************************************************
  1614.             Private Sub mnuCompEdit_Click()
  1615.             Dim nPriority As Long
  1616.             Dim dblStopTime As Double
  1617.             Dim dblStartTime As Double
  1618.             Dim objComp As AMTimelineComp
  1619.             On Local Error GoTo ErrLine
  1620.             
  1621.             'obtain the composition from the global timeline object
  1622.             'which is reset when the user clicks a node on the tree
  1623.             If Not gbl_objDexterObject Is Nothing Then
  1624.                Set objComp = gbl_objDexterObject
  1625.             Else: Exit Sub
  1626.             End If
  1627.             
  1628.             'obtain existing group information
  1629.             If Not objComp Is Nothing Then
  1630.                   'get start /stoptime
  1631.                   Call gbl_objDexterObject.GetStartStop2(dblStartTime, dblStopTime)
  1632.             End If
  1633.             
  1634.             'hide the dialog
  1635.             Load frmComp
  1636.             frmComp.Visible = False
  1637.             
  1638.             'update the form with the existing information
  1639.             With frmComp
  1640.                .txtPriority = 0  'methodology not available
  1641.                .txtStartTime = CStr(dblStartTime)
  1642.                .txtStopTime = CStr(dblStopTime)
  1643.             End With
  1644.             
  1645.             'display the dialog
  1646.             frmComp.Caption = "Edit Composition"
  1647.             frmComp.Show vbModal, Me
  1648.             
  1649.             'wait until the user closes the dialog
  1650.             Do Until frmComp.Visible = False: DoEvents
  1651.             Loop
  1652.             'verify unload mode
  1653.             If frmComp.UnloadMode = 1 Then
  1654.                Unload frmComp: Set frmComp = Nothing: Exit Sub
  1655.             End If
  1656.             
  1657.             'update the timeline info given the new information
  1658.             If Not gbl_objDexterObject Is Nothing Then
  1659.                'set the media times
  1660.                If IsNumeric(frmComp.txtStopTime.Text) And IsNumeric(frmComp.txtStartTime.Text) Then
  1661.                   Call gbl_objDexterObject.SetStartStop2(CDbl(frmComp.txtStopTime.Text), CDbl(frmComp.txtStartTime.Text))
  1662.                End If
  1663.             End If
  1664.             
  1665.             'refresh the ide
  1666.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1667.             
  1668.             'destroy the dialog
  1669.             Unload frmClip: Set frmClip = Nothing
  1670.             Exit Sub
  1671.             
  1672. ErrLine:
  1673.             Err.Clear
  1674.             Exit Sub
  1675.             End Sub
  1676.             
  1677.             
  1678.             ' ******************************************************************************************************************************
  1679.             ' * procedure name: mnuEffect_Click
  1680.             ' * procedure description:  Occurs when the effect popup context menu is invoked
  1681.             ' *
  1682.             ' ******************************************************************************************************************************
  1683.             Private Sub mnuEffect_Click()
  1684.             On Local Error GoTo ErrLine
  1685.             
  1686.             'set menu state
  1687.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  1688.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  1689.                   If mnuEffectExpand.Enabled = True Then mnuEffectExpand.Enabled = False
  1690.                   If mnuEffectCollapse.Enabled = True Then mnuEffectCollapse.Enabled = False
  1691.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  1692.                   If mnuEffectExpand.Enabled = True Then mnuEffectExpand.Enabled = False
  1693.                   If mnuEffectCollapse.Enabled = False Then mnuEffectCollapse.Enabled = True
  1694.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  1695.                   If mnuEffectExpand.Enabled = False Then mnuEffectExpand.Enabled = True
  1696.                   If mnuEffectCollapse.Enabled = True Then mnuEffectCollapse.Enabled = False
  1697.                Else
  1698.                   If mnuEffectExpand.Enabled = True Then mnuEffectExpand.Enabled = False
  1699.                   If mnuEffectCollapse.Enabled = True Then mnuEffectCollapse.Enabled = False
  1700.                End If
  1701.             End If
  1702.             Exit Sub
  1703.             
  1704. ErrLine:
  1705.             Err.Clear
  1706.             Exit Sub
  1707.             End Sub
  1708.             
  1709.             
  1710.             ' ******************************************************************************************************************************
  1711.             ' * procedure name: mnuEffectCollapse_Click
  1712.             ' * procedure description:  Occurs when the effect popup context menu's 'Collapse' option is elected
  1713.             ' *
  1714.             ' ******************************************************************************************************************************
  1715.             Private Sub mnuEffectCollapse_Click()
  1716.             On Local Error GoTo ErrLine
  1717.             
  1718.             'collapse the treeview
  1719.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  1720.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  1721.                   tvwSimpleTree.SelectedItem.Expanded = False
  1722.                   If mnuEffectExpand.Enabled = False Then mnuEffectExpand.Enabled = True
  1723.                   If mnuEffectCollapse.Enabled = True Then mnuEffectCollapse.Enabled = False
  1724.                End If
  1725.             End If
  1726.             Exit Sub
  1727.             
  1728. ErrLine:
  1729.             Err.Clear
  1730.             Exit Sub
  1731.             End Sub
  1732.             
  1733.             
  1734.             ' ******************************************************************************************************************************
  1735.             ' * procedure name: mnuEffectExpand_Click
  1736.             ' * procedure description:  Occurs when the effect popup context menu's 'Expand' option is elected
  1737.             ' *
  1738.             ' ******************************************************************************************************************************
  1739.             Private Sub mnuEffectExpand_Click()
  1740.             On Local Error GoTo ErrLine
  1741.             
  1742.             'expand the treeview
  1743.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  1744.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  1745.                   tvwSimpleTree.SelectedItem.Expanded = True
  1746.                   If mnuEffectExpand.Enabled = True Then mnuEffectExpand.Enabled = False
  1747.                   If mnuEffectCollapse.Enabled = False Then mnuEffectCollapse.Enabled = True
  1748.                End If
  1749.             End If
  1750.             Exit Sub
  1751.             
  1752. ErrLine:
  1753.             Err.Clear
  1754.             Exit Sub
  1755.             End Sub
  1756.             
  1757.             
  1758.             ' ******************************************************************************************************************************
  1759.             ' * procedure name: mnuEffectDelete_Click
  1760.             ' * procedure description:  Occurs when the effect popup context menu's 'Delete' option is elected
  1761.             ' *
  1762.             ' ******************************************************************************************************************************
  1763.             Private Sub mnuEffectDelete_Click()
  1764.             Dim objEffect As AMTimelineEffect
  1765.             On Local Error GoTo ErrLine
  1766.             
  1767.             'obtain the effect from the global timeline object
  1768.             'which is reset when the user clicks a node on the tree
  1769.             If Not gbl_objDexterObject Is Nothing Then
  1770.                Set objEffect = gbl_objDexterObject
  1771.             Else: Exit Sub
  1772.             End If
  1773.             
  1774.             'remove the item
  1775.             Call gbl_objDexterObject.RemoveAll
  1776.             Call gbl_colNormalEnum.Remove(tvwSimpleTree.SelectedItem.Key)
  1777.             Call tvwSimpleTree.Nodes.Remove(tvwSimpleTree.SelectedItem.Index)
  1778.             If Not gbl_objDexterObject Is Nothing Then Set gbl_objDexterObject = Nothing
  1779.             
  1780.             'clean-up & dereference
  1781.             If Not objEffect Is Nothing Then Set objEffect = Nothing
  1782.             Exit Sub
  1783.             
  1784. ErrLine:
  1785.             Err.Clear
  1786.             Exit Sub
  1787.             End Sub
  1788.             
  1789.             
  1790.             ' ******************************************************************************************************************************
  1791.             ' * procedure name: mnuEffectEdit_Click
  1792.             ' * procedure description:  Occurs when the effect popup context menu's 'Edit' option is elected
  1793.             ' *
  1794.             ' ******************************************************************************************************************************
  1795.             Private Sub mnuEffectEdit_Click()
  1796.             Dim nPriority As Long
  1797.             Dim dblStopTime As Double
  1798.             Dim dblStartTime As Double
  1799.             Dim bstrEffectCLSID As String
  1800.             Dim objEffect As AMTimelineEffect
  1801.             On Local Error GoTo ErrLine
  1802.             
  1803.             'obtain the effect from the global timeline object
  1804.             'which is reset when the user clicks a node on the tree
  1805.             If Not gbl_objDexterObject Is Nothing Then
  1806.                Set objEffect = gbl_objDexterObject
  1807.             Else: Exit Sub
  1808.             End If
  1809.             
  1810.             'obtain existing group information
  1811.             If Not objEffect Is Nothing Then
  1812.                With objEffect
  1813.                   'get priority
  1814.                   Call objEffect.EffectGetPriority(nPriority)
  1815.                   'get start /stoptime
  1816.                   Call gbl_objDexterObject.GetStartStop2(dblStartTime, dblStopTime)
  1817.                   'get effect guid
  1818.                   bstrEffectCLSID = gbl_objDexterObject.GetSubObjectGUIDB
  1819.                End With
  1820.             End If
  1821.             
  1822.             'hide the dialog
  1823.             Load frmEffect
  1824.             frmEffect.Visible = False
  1825.             
  1826.             'update the form with the existing information
  1827.             With frmEffect
  1828.                .txtPriority = 0  'methodology not available
  1829.                .txtStartTime = CStr(dblStartTime)
  1830.                .txtStopTime = CStr(dblStopTime)
  1831.                .cmbEffect.Text = CStr(EffectCLSIDToFriendlyName(bstrEffectCLSID))
  1832.             End With
  1833.             
  1834.             'display the dialog
  1835.             frmEffect.Caption = "Edit Composition"
  1836.             frmEffect.Show vbModal, Me
  1837.             
  1838.             'wait until the user closes the dialog
  1839.             Do Until frmEffect.Visible = False: DoEvents
  1840.             Loop
  1841.             'verify unload mode
  1842.             If frmEffect.UnloadMode = 1 Then
  1843.                Unload frmEffect: Set frmEffect = Nothing: Exit Sub
  1844.             End If
  1845.             
  1846.             'query the dialog information
  1847.             With frmEffect
  1848.                If IsNumeric(.txtStartTime.Text) Then
  1849.                   dblStartTime = CDbl(.txtStartTime.Text)
  1850.                End If
  1851.                If IsNumeric(.txtStopTime.Text) Then
  1852.                   dblStopTime = CDbl(.txtStopTime.Text)
  1853.                End If
  1854.                If IsNumeric(.txtPriority.Text) Then
  1855.                   nPriority = CLng(.txtPriority.Text)
  1856.                End If
  1857.                If .cmbEffect.Text <> vbNullString Then
  1858.                   bstrEffectCLSID = CStr(.cmbEffect.Text)
  1859.                End If
  1860.             End With
  1861.             
  1862.             'update the timeline info given the new information
  1863.             If Not gbl_objDexterObject Is Nothing Then
  1864.                'set the media times
  1865.                Call gbl_objDexterObject.SetStartStop2(dblStartTime, dblStopTime)
  1866.                'set the effect
  1867.                If EffectFriendlyNameToCLSID(bstrEffectCLSID) <> vbNullString Then
  1868.                   Call gbl_objDexterObject.SetSubObjectGUIDB(EffectFriendlyNameToCLSID(bstrEffectCLSID))
  1869.                End If
  1870.                'refresh the ide
  1871.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1872.             End If
  1873.             
  1874.             'destroy the dialog
  1875.             Unload frmClip: Set frmClip = Nothing
  1876.             Exit Sub
  1877.             
  1878. ErrLine:
  1879.             Err.Clear
  1880.             Exit Sub
  1881.             End Sub
  1882.             
  1883.             
  1884.             ' ******************************************************************************************************************************
  1885.             ' * procedure name: mnuFile_Click
  1886.             ' * procedure description:  Occurs when the file popup context menu is invoked
  1887.             ' *
  1888.             ' ******************************************************************************************************************************
  1889.             Private Sub mnuFile_Click()
  1890.             On Local Error GoTo ErrLine
  1891.             
  1892.             'do not allow new timeline or open file operations when rendering..
  1893.             If Not gbl_objQuartzVB Is Nothing Then
  1894.                If gbl_objQuartzVB.State = QTZStatusPlaying Then
  1895.                   If mnuFileNew.Enabled = True Then mnuFileNew.Enabled = False
  1896.                   If mnuFileOpen.Enabled = True Then mnuFileOpen.Enabled = False
  1897.                Else
  1898.                   If mnuFileNew.Enabled = False Then mnuFileNew.Enabled = True
  1899.                   If mnuFileOpen.Enabled = False Then mnuFileOpen.Enabled = True
  1900.                End If
  1901.             End If
  1902.             Exit Sub
  1903.             
  1904. ErrLine:
  1905.             Err.Clear
  1906.             Exit Sub
  1907.             End Sub
  1908.             
  1909.             
  1910.             ' ******************************************************************************************************************************
  1911.             ' * procedure name: mnuFileExit_Click
  1912.             ' * procedure description:  Occurs when the file popup context menu's 'Exit' option is elected
  1913.             ' *
  1914.             ' ******************************************************************************************************************************
  1915.             Private Sub mnuFileExit_Click()
  1916.             Dim frm As Form
  1917.             On Local Error GoTo ErrLine
  1918.             
  1919.             'proceed to end the application
  1920.             For Each frm In Forms
  1921.                   frm.Move Screen.Width * -8, Screen.Height * -8
  1922.                   frm.Visible = False: Unload frm
  1923.             Next
  1924.             Exit Sub
  1925.             
  1926. ErrLine:
  1927.             Err.Clear
  1928.             Exit Sub
  1929.             End Sub
  1930.             
  1931.             
  1932.             ' ******************************************************************************************************************************
  1933.             ' * procedure name: mnuFileNewTimeline_Click
  1934.             ' * procedure description:  Occurs when the file popup context menu's 'New' option is elected
  1935.             ' *
  1936.             ' ******************************************************************************************************************************
  1937.             Private Sub mnuFileNewTimeline_Click()
  1938.             On Local Error GoTo ErrLine
  1939.             
  1940.             'display the timeline dialog
  1941.             frmTimeline.Show vbModal, Me
  1942.             frmTimeline.Caption = "Insert Timeline"
  1943.             
  1944.             'wait until the user closes the dialog
  1945.             Do Until frmTimeline.Visible = False: DoEvents
  1946.             Loop
  1947.             'determine if they canceled out
  1948.             If frmTimeline.UnloadMode = 1 Then
  1949.                Unload frmTimeline: Set frmTimeline = Nothing: Exit Sub
  1950.             End If
  1951.             'clear the existing timeline
  1952.             If Not gbl_objTimeline Is Nothing Then Call ClearTimeline(gbl_objTimeline)
  1953.             'dereference & clean-up application-level data
  1954.             If Not gbl_objTimeline Is Nothing Then Set gbl_objTimeline = Nothing
  1955.             If Not gbl_objFilterGraph Is Nothing Then Set gbl_objFilterGraph = Nothing
  1956.             'reinitalize application-level data
  1957.             Set gbl_objTimeline = New AMTimeline
  1958.             Set gbl_objFilterGraph = New FilgraphManager
  1959.             'reinitalize the treeview/listview
  1960.             Call lstViewInfo.ListItems.Clear
  1961.             Call tvwSimpleTree.Nodes.Clear
  1962.             
  1963.             'set default(s)
  1964.             With gbl_objTimeline
  1965.                If IsNumeric(frmTimeline.txtTransitionsEnabled.Text) Then
  1966.                   .EnableTransitions CLng(frmTimeline.txtTransitionsEnabled.Text)
  1967.                End If
  1968.                If IsNumeric(frmTimeline.txtEffectsEnabled.Text) Then
  1969.                   .EnableEffects CLng(frmTimeline.txtEffectsEnabled.Text)
  1970.                End If
  1971.                If IsNumeric(frmTimeline.txtDefaultFPS.Text) Then
  1972.                   .SetDefaultFPS CDbl(frmTimeline.txtDefaultFPS.Text)
  1973.                End If
  1974.                If frmTimeline.cmbDefaultTransition.Text <> vbNullString Then
  1975.                   .SetDefaultTransitionB CStr(TransitionFriendlyNameToCLSID(frmTimeline.cmbDefaultTransition.Text))
  1976.                End If
  1977.                If frmTimeline.cmbDefaultEffect.Text <> vbNullString Then
  1978.                   .SetDefaultEffectB CStr(EffectFriendlyNameToCLSID(frmTimeline.cmbDefaultEffect.Text))
  1979.                End If
  1980.             End With
  1981.             
  1982.             'unload dialog
  1983.             Unload frmTimeline: Set frmTimeline = Nothing
  1984.             
  1985.             'update ide
  1986.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  1987.             
  1988.             'update the button(s)
  1989.            With tbMain.Buttons
  1990.               .Item("Play").Enabled = True
  1991.               .Item("Pause").Enabled = False
  1992.               .Item("Stop").Enabled = False
  1993.               .Item("Rewind").Enabled = False
  1994.               .Item("FastForward").Enabled = False
  1995.               .Item("SeekForward").Enabled = False
  1996.               .Item("SeekBackward").Enabled = False
  1997.            End With
  1998.            
  1999.             'update the state on the popup context menu
  2000.             mnuTimeLinePlay.Enabled = True
  2001.             mnuTimeLineStop.Enabled = False
  2002.             mnuTimeLinePause.Enabled = False
  2003.             mnuTimeLineRenderTimeLine.Enabled = True
  2004.             mnuTimeLineClearRenderEngine.Enabled = True
  2005.             Exit Sub
  2006.             
  2007. ErrLine:
  2008.             Err.Clear
  2009.             Exit Sub
  2010.             End Sub
  2011.             
  2012.             
  2013.             ' ******************************************************************************************************************************
  2014.             ' * procedure name: mnuFileOpen_Click
  2015.             ' * procedure description:  Occurs when the file popup context menu's 'Open' option is elected
  2016.             ' *
  2017.             ' ******************************************************************************************************************************
  2018.             Private Sub mnuFileOpen_Click()
  2019.             Dim nCount As Long
  2020.             Dim bstrFileName As String
  2021.             Dim objLocalTimeline As AMTimeline
  2022.             On Local Error GoTo ErrLine
  2023.             'display a common dialog
  2024.             'for the user and obtain a filename
  2025.             With ctrlCommonDialog
  2026.                .CancelError = True
  2027.                .DefaultExt = "XTL"
  2028.                .Filter = "XTL Files (*.xtl)|*.xtl|"
  2029.                .ShowOpen: bstrFileName = .FileName
  2030.             End With
  2031.             
  2032.             'verify the file extension is valid
  2033.             If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  2034.                'at least it's been named an xtl file, proceed to attempt an import..
  2035.                Set objLocalTimeline = New AMTimeline
  2036.                Call RestoreTimeline(objLocalTimeline, bstrFileName, DEXImportXTL)
  2037.                'verify restoration
  2038.                If Not objLocalTimeline Is Nothing Then
  2039.                   'import succeeded; clean-up application-level scope
  2040.                   If Not gbl_objTimeline Is Nothing Then
  2041.                     'dereference & clean-up timeline
  2042.                      Call ClearTimeline(gbl_objTimeline)
  2043.                      Set gbl_objTimeline = Nothing
  2044.                      'dereference & clean-up rendering
  2045.                      If Not gbl_objQuartzVB Is Nothing Then Call gbl_objQuartzVB.StopGraph
  2046.                      If Not gbl_objFilterGraph Is Nothing Then Set gbl_objFilterGraph = Nothing
  2047.                      If Not gbl_objRenderEngine Is Nothing Then Call gbl_objRenderEngine.ScrapIt
  2048.                      If Not gbl_objRenderEngine Is Nothing Then Set gbl_objRenderEngine = Nothing
  2049.                   End If
  2050.                   'assign the local timeline to global scope
  2051.                   Set gbl_objTimeline = objLocalTimeline
  2052.                   'render the timeline and derive a filter graph manager
  2053.                   Set gbl_objFilterGraph = RenderTimeline(gbl_objTimeline)
  2054.                   'map the timeline to the userinterface
  2055.                   Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2056.                   mnuTimeLineClearRenderEngine.Enabled = False
  2057.                   'update the button(s)
  2058.                   With tbMain.Buttons
  2059.                      .Item("Play").Enabled = True
  2060.                      .Item("Pause").Enabled = False
  2061.                      .Item("Stop").Enabled = False
  2062.                      .Item("Rewind").Enabled = False
  2063.                      .Item("FastForward").Enabled = False
  2064.                      .Item("SeekForward").Enabled = False
  2065.                      .Item("SeekBackward").Enabled = False
  2066.                   End With
  2067.                   
  2068.                   'enable/disable the state of the popup context menu's
  2069.                   If mnuTimeLinePlay.Enabled = False Then mnuTimeLinePlay.Enabled = True
  2070.                   If mnuTimeLineStop.Enabled = True Then mnuTimeLineStop.Enabled = False
  2071.                   If mnuTimeLinePause.Enabled = False Then mnuTimeLinePause.Enabled = True
  2072.                   If mnuTimeLineRenderTimeLine.Enabled = True Then mnuTimeLineRenderTimeLine.Enabled = False
  2073.                   If mnuTimeLineClearRenderEngine.Enabled = False Then mnuTimeLineClearRenderEngine.Enabled = True
  2074.                   'reset module-level filename
  2075.                   gbl_bstrLoadFile = ctrlCommonDialog.FileName
  2076.                   'reset the caption on the application's main form
  2077.                   bstrFileName = Mid(bstrFileName, InStrRev(bstrFileName, "\") + 1)
  2078.                   Me.Caption = "DexterVB - " & bstrFileName
  2079.                End If
  2080.             End If
  2081.             'clean-up & dereference
  2082.             If Not objLocalTimeline Is Nothing Then Set objLocalTimeline = Nothing
  2083.             Exit Sub
  2084.             
  2085. ErrLine:
  2086.             Err.Clear
  2087.             Exit Sub
  2088.             End Sub
  2089.             
  2090.             
  2091.             ' ******************************************************************************************************************************
  2092.             ' * procedure name: mnuFileSaveAs_Click
  2093.             ' * procedure description:  Occurs when the file popup context menu's 'SaveAs' option is elected
  2094.             ' *
  2095.             ' ******************************************************************************************************************************
  2096.             Private Sub mnuFileSaveAs_Click()
  2097.             Dim bstrFileName As String
  2098.             On Local Error GoTo ErrLine
  2099.             
  2100.             'display a common dialog
  2101.             'for the user and obtain a filename
  2102.             With ctrlCommonDialog
  2103.                .CancelError = True
  2104.                .DefaultExt = "XTL"
  2105.                .Filter = "XTL Files (*.xtl)|*.xtl|Graph Files (*.grf)|*.grf|"
  2106.                .ShowSave: bstrFileName = .FileName
  2107.             End With
  2108.             
  2109.             'verify the file extension is valid
  2110.             If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  2111.                'user would like to export as an xtl file, proceed to attempt an export..
  2112.                If Not gbl_objTimeline Is Nothing Then
  2113.                   Call SaveTimeline(gbl_objTimeline, bstrFileName, DEXExportXTL)
  2114.                End If
  2115.             ElseIf InStr(1, LCase(bstrFileName), ".grf") > 0 Then
  2116.                'user would like to export as a graph file, proceed to attempt an export..
  2117.                If Not gbl_objTimeline Is Nothing Then
  2118.                   Call SaveTimeline(gbl_objTimeline, bstrFileName, DEXExportGRF)
  2119.                End If
  2120.             End If
  2121.             Exit Sub
  2122.             
  2123. ErrLine:
  2124.             Err.Clear
  2125.             Exit Sub
  2126.             End Sub
  2127.             
  2128.             
  2129.             ' ******************************************************************************************************************************
  2130.             ' * procedure name: mnuGroup_Click
  2131.             ' * procedure description:  Occurs when the group popup context menu is invoked
  2132.             ' *
  2133.             ' ******************************************************************************************************************************
  2134.             Private Sub mnuGroup_Click()
  2135.             On Local Error GoTo ErrLine
  2136.             
  2137.             'set menu state
  2138.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  2139.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  2140.                   If mnuGroupExpand.Enabled = True Then mnuGroupExpand.Enabled = False
  2141.                   If mnuGroupCollapse.Enabled = True Then mnuGroupCollapse.Enabled = False
  2142.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  2143.                   If mnuGroupExpand.Enabled = True Then mnuGroupExpand.Enabled = False
  2144.                   If mnuGroupCollapse.Enabled = False Then mnuGroupCollapse.Enabled = True
  2145.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  2146.                   If mnuGroupExpand.Enabled = False Then mnuGroupExpand.Enabled = True
  2147.                   If mnuGroupCollapse.Enabled = True Then mnuGroupCollapse.Enabled = False
  2148.                Else
  2149.                   If mnuGroupExpand.Enabled = True Then mnuGroupExpand.Enabled = False
  2150.                   If mnuGroupCollapse.Enabled = True Then mnuGroupCollapse.Enabled = False
  2151.                End If
  2152.             End If
  2153.             Exit Sub
  2154.             
  2155. ErrLine:
  2156.             Err.Clear
  2157.             Exit Sub
  2158.             End Sub
  2159.             
  2160.             
  2161.             ' ******************************************************************************************************************************
  2162.             ' * procedure name: mnuGroupCollapse_Click
  2163.             ' * procedure description:  Occurs when the group popup context menu's 'Collapse' option is elected
  2164.             ' *
  2165.             ' ******************************************************************************************************************************
  2166.             Private Sub mnuGroupCollapse_Click()
  2167.             On Local Error GoTo ErrLine
  2168.             
  2169.             'collapse the treeview
  2170.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  2171.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  2172.                   tvwSimpleTree.SelectedItem.Expanded = False
  2173.                   If mnuGroupExpand.Enabled = False Then mnuGroupExpand.Enabled = True
  2174.                   If mnuGroupCollapse.Enabled = True Then mnuGroupCollapse.Enabled = False
  2175.                End If
  2176.             End If
  2177.             Exit Sub
  2178.             
  2179. ErrLine:
  2180.             Err.Clear
  2181.             Exit Sub
  2182.             End Sub
  2183.             
  2184.             
  2185.             ' ******************************************************************************************************************************
  2186.             ' * procedure name: mnuGroupExpand_Click
  2187.             ' * procedure description:  Occurs when the group popup context menu's 'Expand' option is elected
  2188.             ' *
  2189.             ' ******************************************************************************************************************************
  2190.             Private Sub mnuGroupExpand_Click()
  2191.             On Local Error GoTo ErrLine
  2192.             
  2193.             'expand the treeview
  2194.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  2195.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  2196.                   tvwSimpleTree.SelectedItem.Expanded = True
  2197.                   If mnuGroupExpand.Enabled = True Then mnuGroupExpand.Enabled = False
  2198.                   If mnuGroupCollapse.Enabled = False Then mnuGroupCollapse.Enabled = True
  2199.                End If
  2200.             End If
  2201.             Exit Sub
  2202.             
  2203. ErrLine:
  2204.             Err.Clear
  2205.             Exit Sub
  2206.             End Sub
  2207.             
  2208.             
  2209.             ' ******************************************************************************************************************************
  2210.             ' * procedure name: mnuGroupAddComp_Click
  2211.             ' * procedure description:  Occurs when the group popup context menu's 'Add Composition' option is elected
  2212.             ' *
  2213.             ' ******************************************************************************************************************************
  2214.             Private Sub mnuGroupAddComp_Click()
  2215.             Dim nPriority As Long
  2216.             Dim dblStartTime As Double
  2217.             Dim dblStopTime As Double
  2218.             Dim objNewComposite As AMTimelineComp
  2219.             On Local Error GoTo ErrLine
  2220.             
  2221.             'display the dialog
  2222.             frmComp.Caption = "Add Composition"
  2223.             frmComp.Show vbModal, Me
  2224.             
  2225.             'wait until the user closes the dialog
  2226.             Do Until frmComp.Visible = False: DoEvents
  2227.             Loop
  2228.             'verify unload mode
  2229.             If frmComp.UnloadMode = 1 Then
  2230.                Unload frmComp: Set frmComp = Nothing: Exit Sub
  2231.             End If
  2232.             
  2233.             'query the dialog for user input
  2234.             With frmComp
  2235.                If IsNumeric(.txtPriority.Text) Then
  2236.                   nPriority = CLng(.txtPriority.Text)
  2237.                End If
  2238.                If IsNumeric(.txtStartTime.Text) Then
  2239.                   dblStartTime = CDbl(.txtStartTime.Text)
  2240.                End If
  2241.                If IsNumeric(.txtStopTime.Text) Then
  2242.                   dblStopTime = CDbl(.txtStopTime.Text)
  2243.                End If
  2244.             End With
  2245.             
  2246.             'insert the composite into the timeline
  2247.             If Not gbl_objTimeline Is Nothing Then
  2248.                Set objNewComposite = CreateComposite(gbl_objTimeline)
  2249.                If Not objNewComposite Is Nothing Then Call InsertComposite(objNewComposite, gbl_objDexterObject)
  2250.                'refresh the ide
  2251.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2252.             End If
  2253.             
  2254.             'unload the dialog
  2255.             Unload frmComp: Set frmComp = Nothing
  2256.             Exit Sub
  2257.             
  2258. ErrLine:
  2259.             Err.Clear
  2260.             Exit Sub
  2261.             End Sub
  2262.             
  2263.             
  2264.             ' ******************************************************************************************************************************
  2265.             ' * procedure name: mnuGroupAddEffect_Click
  2266.             ' * procedure description:  Occurs when the group popup context menu's 'Add Effect' option is elected
  2267.             ' *
  2268.             ' ******************************************************************************************************************************
  2269.             Private Sub mnuGroupAddEffect_Click()
  2270.             Dim nEffectPriority As Long
  2271.             Dim bstrEffectGUID As String
  2272.             Dim dblEffectStopTime As Double
  2273.             Dim dblEffectStartTime As Double
  2274.             Dim objNewEffect As AMTimelineEffect
  2275.             Dim objTimelineObject As AMTimelineObj
  2276.             On Local Error GoTo ErrLine
  2277.             
  2278.             'display the insert effect dialog
  2279.             frmEffect.Caption = "Add Effect"
  2280.             frmEffect.Show vbModal, Me
  2281.             
  2282.             'wait until the user closes the dialog
  2283.             Do: DoEvents
  2284.             If frmEffect.Visible = False Then Exit Do
  2285.             Loop
  2286.             'verify unload mode
  2287.             If frmEffect.UnloadMode = 1 Then
  2288.                Unload frmEffect: Set frmEffect = Nothing: Exit Sub
  2289.             End If
  2290.             
  2291.             'query the dialog information
  2292.             With frmEffect
  2293.                If IsNumeric(.txtStartTime.Text) Then
  2294.                   dblEffectStartTime = CDbl(.txtStartTime.Text)
  2295.                End If
  2296.                If IsNumeric(.txtStopTime.Text) Then
  2297.                   dblEffectStopTime = CDbl(.txtStopTime.Text)
  2298.                End If
  2299.                If IsNumeric(.txtPriority.Text) Then
  2300.                   nEffectPriority = CLng(.txtPriority.Text)
  2301.                End If
  2302.                If .cmbEffect.Text <> vbNullString Then
  2303.                   bstrEffectGUID = CStr(.cmbEffect.Text)
  2304.                End If
  2305.             End With
  2306.             
  2307.             'insert the effect into the timeline
  2308.             If Not gbl_objTimeline Is Nothing Then
  2309.                Set objNewEffect = CreateEffect(gbl_objTimeline)
  2310.                If Not objNewEffect Is Nothing Then Call InsertEffect(objNewEffect, gbl_objDexterObject, EffectFriendlyNameToCLSID(bstrEffectGUID), dblEffectStartTime, dblEffectStopTime)
  2311.                'refresh the ide
  2312.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2313.             End If
  2314.             
  2315.             'destroy the dialog
  2316.             Unload frmEffect: Set frmEffect = Nothing
  2317.             Exit Sub
  2318.             
  2319. ErrLine:
  2320.             Err.Clear
  2321.             Exit Sub
  2322.             End Sub
  2323.             
  2324.             
  2325.             ' ******************************************************************************************************************************
  2326.             ' * procedure name: mnuGroupAddTrack_Click
  2327.             ' * procedure description:  Occurs when the group popup context menu's 'Add Track' option is elected
  2328.             ' *
  2329.             ' ******************************************************************************************************************************
  2330.             Private Sub mnuGroupAddTrack_Click()
  2331.             Dim nBlank As Long
  2332.             Dim nMuted As Long
  2333.             Dim nPriority As Long
  2334.             Dim dblStartTime As Double
  2335.             Dim dblStopTime As Double
  2336.             Dim objNewTrack As AMTimelineTrack
  2337.             On Local Error GoTo ErrLine
  2338.             
  2339.             'display the dialog
  2340.             frmTrack.Caption = "Add Track"
  2341.             frmTrack.Show vbModal, Me
  2342.             
  2343.             'wait until the user closes the dialog
  2344.             Do Until frmTrack.Visible = False: DoEvents
  2345.             Loop
  2346.             'verify unload mode
  2347.             If frmTrack.UnloadMode = 1 Then
  2348.                Unload frmTrack: Set frmTrack = Nothing: Exit Sub
  2349.             End If
  2350.             
  2351.             'obtain the user input from the dialog
  2352.             With frmTrack
  2353.                If IsNumeric(.txtBlank.Text) Then
  2354.                   nBlank = CLng(.txtBlank.Text)
  2355.                End If
  2356.                If IsNumeric(.txtMuted.Text) Then
  2357.                   nMuted = CLng(.txtMuted.Text)
  2358.                End If
  2359.                If IsNumeric(.txtMuted.Text) Then
  2360.                   nPriority = CLng(.txtMuted.Text)
  2361.                End If
  2362.                If IsNumeric(.txtStartTime.Text) Then
  2363.                   dblStartTime = CDbl(.txtStartTime.Text)
  2364.                End If
  2365.                If IsNumeric(.txtStopTime.Text) Then
  2366.                   dblStopTime = CDbl(.txtStopTime.Text)
  2367.                End If
  2368.             End With
  2369.             
  2370.             'insert the track into the timeline
  2371.             If Not gbl_objTimeline Is Nothing Then
  2372.                Set objNewTrack = CreateTrack(gbl_objTimeline)
  2373.                If Not objNewTrack Is Nothing Then Call InsertTrack(objNewTrack, gbl_objDexterObject, nPriority)
  2374.                'refresh the ide
  2375.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2376.             End If
  2377.             
  2378.             'destroy dialog
  2379.             Unload frmTrack: Set frmTrack = Nothing
  2380.             Exit Sub
  2381.             
  2382. ErrLine:
  2383.             Err.Clear
  2384.             Exit Sub
  2385.             End Sub
  2386.             
  2387.             
  2388.             ' ******************************************************************************************************************************
  2389.             ' * procedure name: mnuGroupAddTransition_Click
  2390.             ' * procedure description:  Occurs when the group popup context menu's 'Add Transition' option is elected
  2391.             ' *
  2392.             ' ******************************************************************************************************************************
  2393.             Private Sub mnuGroupAddTransition_Click()
  2394.             Dim nCutpoint As Long
  2395.             Dim nCutsOnly As Long
  2396.             Dim nSwapInputs As Long
  2397.             Dim bstrTransition As String
  2398.             Dim dblStartTime As Double
  2399.             Dim dblStopTime As Double
  2400.             Dim objNewTransition As AMTimelineTrans
  2401.             On Local Error GoTo ErrLine
  2402.             
  2403.             'display the dialog
  2404.             frmTransitions.Caption = "Add Transition"
  2405.             frmTransitions.Show vbModal, Me
  2406.             
  2407.             'wait until the user closes the dialog
  2408.             Do Until frmTransitions.Visible = False: DoEvents
  2409.             Loop
  2410.             'verify unload mode
  2411.             If frmTransitions.UnloadMode = 1 Then
  2412.                Unload frmTransitions: Set frmTransitions = Nothing: Exit Sub
  2413.             End If
  2414.             
  2415.             'obtain user input
  2416.             With frmTransitions
  2417.                If IsNumeric(.txtCutpoint.Text) Then
  2418.                   nCutpoint = CLng(.txtCutpoint.Text)
  2419.                End If
  2420.                If IsNumeric(.txtCutsOnly.Text) Then
  2421.                   nCutsOnly = CLng(.txtCutsOnly.Text)
  2422.                End If
  2423.                If IsNumeric(.txtSwapInputs.Text) Then
  2424.                   nSwapInputs = CLng(.txtSwapInputs.Text)
  2425.                End If
  2426.                If IsNumeric(.txtStartTime.Text) Then
  2427.                   dblStartTime = CDbl(.txtStartTime.Text)
  2428.                End If
  2429.                If IsNumeric(.txtStopTime.Text) Then
  2430.                   dblStopTime = CDbl(.txtStopTime.Text)
  2431.                End If
  2432.                If .cmbTransition.Text <> vbNullString Then
  2433.                   bstrTransition = CStr(.cmbTransition.Text)
  2434.                End If
  2435.             End With
  2436.             
  2437.             'insert the transition into the timeline
  2438.             If Not gbl_objTimeline Is Nothing Then
  2439.                Set objNewTransition = CreateTransition(gbl_objTimeline)
  2440.                If Not objNewTransition Is Nothing Then Call InsertTransition(objNewTransition, gbl_objDexterObject, TransitionFriendlyNameToCLSID(bstrTransition), dblStartTime, dblStopTime)
  2441.                'refresh the ide
  2442.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2443.             End If
  2444.             
  2445.             'destroy the dialog
  2446.             Unload frmTransitions: Set frmTransitions = Nothing
  2447.             Exit Sub
  2448.             
  2449. ErrLine:
  2450.             Err.Clear
  2451.             Exit Sub
  2452.             End Sub
  2453.             
  2454.             
  2455.             ' ******************************************************************************************************************************
  2456.             ' * procedure name: mnuGroupDelete_Click
  2457.             ' * procedure description:  Occurs when the group popup context menu's 'Delete' option is elected
  2458.             ' *
  2459.             ' ******************************************************************************************************************************
  2460.             Private Sub mnuGroupDelete_Click()
  2461.             Dim objGroup As AMTimelineGroup
  2462.             On Local Error GoTo ErrLine
  2463.             
  2464.             'obtain the group from the global timeline object
  2465.             'which is reset when the user clicks a node on the tree
  2466.             If Not gbl_objDexterObject Is Nothing Then
  2467.                Set objGroup = gbl_objDexterObject
  2468.             Else: Exit Sub
  2469.             End If
  2470.             
  2471.             'remove the item
  2472.             Call gbl_objDexterObject.RemoveAll
  2473.             Call gbl_colNormalEnum.Remove(tvwSimpleTree.SelectedItem.Key)
  2474.             Call tvwSimpleTree.Nodes.Remove(tvwSimpleTree.SelectedItem.Index)
  2475.             If Not gbl_objDexterObject Is Nothing Then Set gbl_objDexterObject = Nothing
  2476.             Exit Sub
  2477.             
  2478. ErrLine:
  2479.             Err.Clear
  2480.             Exit Sub
  2481.             End Sub
  2482.             
  2483.             
  2484.             ' ******************************************************************************************************************************
  2485.             ' * procedure name: mnuGroupEdit_Click
  2486.             ' * procedure description:  Occurs when the group popup context menu's 'Edit' option is elected
  2487.             ' *
  2488.             ' ******************************************************************************************************************************
  2489.             Private Sub mnuGroupEdit_Click()
  2490.             Dim nPriority As Long
  2491.             Dim nOutputBuffer As Long
  2492.             Dim nPreviewMode As Long
  2493.             Dim dblOutputFPS As Double
  2494.             Dim bstrGroupName As String
  2495.             Dim nSmartRecompDirty As Long
  2496.             Dim nSmartRecompFormat As Long
  2497.             Dim objGroup As AMTimelineGroup
  2498.             On Local Error GoTo ErrLine
  2499.             
  2500.             'obtain the group from the global timeline object
  2501.             'which is reset when the user clicks a node on the tree
  2502.             If Not gbl_objDexterObject Is Nothing Then
  2503.                Set objGroup = gbl_objDexterObject
  2504.             Else: Exit Sub
  2505.             End If
  2506.             
  2507.             'obtain existing group information
  2508.             If Not objGroup Is Nothing Then
  2509.                With objGroup
  2510.                    bstrGroupName = .GetGroupName
  2511.                   Call .GetOutputBuffering(nOutputBuffer)
  2512.                   Call .GetOutputFPS(dblOutputFPS)
  2513.                   Call .GetPreviewMode(nPreviewMode)
  2514.                   Call .GetPriority(nPriority)
  2515.                   Call .IsRecompressFormatDirty(nSmartRecompDirty)
  2516.                   Call .IsSmartRecompressFormatSet(nSmartRecompFormat)
  2517.                End With
  2518.             End If
  2519.             
  2520.             'hide the dialog
  2521.             Load frmGroup
  2522.             frmTimeline.Visible = False
  2523.             
  2524.             'update the form with the existing information
  2525.             With frmGroup
  2526.                .txtGroupName = bstrGroupName
  2527.                .txtMediaType = "?"  'feature unavailable, simply set to nullstring
  2528.                .txtPriority = nPriority
  2529.                .txtOutputFPS = dblOutputFPS
  2530.                .txtPreviewMode = nPreviewMode
  2531.                .txtBuffering = nOutputBuffer
  2532.             End With
  2533.             
  2534.             'display the dialog
  2535.             frmGroup.Caption = "Edit Group"
  2536.             frmGroup.Show vbModal, Me
  2537.             
  2538.             'wait until the user closes the dialog
  2539.             Do Until frmGroup.Visible = False: DoEvents
  2540.             Loop
  2541.             'verify unload mode
  2542.             If frmGroup.UnloadMode = 1 Then
  2543.                Unload frmGroup: Set frmGroup = Nothing: Exit Sub
  2544.             End If
  2545.             
  2546.             'update the timeline info given the new information
  2547.             With objGroup
  2548.                .SetGroupName CStr(frmGroup.txtGroupName)
  2549.                If IsNumeric(frmGroup.txtMediaType) Then
  2550.                   .SetMediaTypeForVB CLng(frmGroup.txtMediaType)
  2551.                End If
  2552.                If IsNumeric(frmGroup.txtOutputFPS) Then
  2553.                   If CDbl(frmGroup.txtOutputFPS) > 0 Then
  2554.                      .SetOutputFPS CDbl(frmGroup.txtOutputFPS)
  2555.                   End If
  2556.                End If
  2557.                If IsNumeric(frmGroup.txtPreviewMode) Then
  2558.                   .SetPreviewMode CLng(frmGroup.txtPreviewMode)
  2559.                End If
  2560.                If IsNumeric(frmGroup.txtBuffering) Then
  2561.                   If CLng(frmGroup.txtBuffering) > 0 Then
  2562.                       .SetOutputBuffering CLng(frmGroup.txtBuffering)
  2563.                   End If
  2564.                End If
  2565.             End With
  2566.             
  2567.             'refresh the ide
  2568.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2569.             
  2570.             'destroy the dialog
  2571.             Unload frmGroup: Set frmGroup = Nothing
  2572.             Exit Sub
  2573.             
  2574. ErrLine:
  2575.             Err.Clear
  2576.             Exit Sub
  2577.             End Sub
  2578.             
  2579.             
  2580.             ' ******************************************************************************************************************************
  2581.             ' * procedure name: mnuHelpAbout_Click
  2582.             ' * procedure description:  Occurs when the help menu's 'About' option is elected
  2583.             ' *
  2584.             ' ******************************************************************************************************************************
  2585.             Private Sub mnuHelpAbout_Click()
  2586.             On Local Error GoTo ErrLine
  2587.             
  2588.             'display the about dialog for the user
  2589.             frmAbout.Show 1, Me
  2590.             frmAbout.SetFocus
  2591.             Exit Sub
  2592.             
  2593. ErrLine:
  2594.             Err.Clear
  2595.             Exit Sub
  2596.             End Sub
  2597.             
  2598.             
  2599.             ' ******************************************************************************************************************************
  2600.             ' * procedure name: mnuTimeLine_Click
  2601.             ' * procedure description:  Occurs when the timeline popup context menu is invoked
  2602.             ' *
  2603.             ' ******************************************************************************************************************************
  2604.             Private Sub mnuTimeLine_Click()
  2605.             On Local Error GoTo ErrLine
  2606.             
  2607.             'set menu state
  2608.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  2609.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  2610.                   If mnuTimelineExpand.Enabled = True Then mnuTimelineExpand.Enabled = False
  2611.                   If mnuTimelineCollapse.Enabled = True Then mnuTimelineCollapse.Enabled = False
  2612.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  2613.                   If mnuTimelineExpand.Enabled = True Then mnuTimelineExpand.Enabled = False
  2614.                   If mnuTimelineCollapse.Enabled = False Then mnuTimelineCollapse.Enabled = True
  2615.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  2616.                   If mnuTimelineExpand.Enabled = False Then mnuTimelineExpand.Enabled = True
  2617.                   If mnuTimelineCollapse.Enabled = True Then mnuTimelineCollapse.Enabled = False
  2618.                Else
  2619.                   If mnuTimelineExpand.Enabled = True Then mnuTimelineExpand.Enabled = False
  2620.                   If mnuTimelineCollapse.Enabled = True Then mnuTimelineCollapse.Enabled = False
  2621.                End If
  2622.             End If
  2623.             Exit Sub
  2624.             
  2625. ErrLine:
  2626.             Err.Clear
  2627.             Exit Sub
  2628.             End Sub
  2629.             
  2630.             
  2631.             ' ******************************************************************************************************************************
  2632.             ' * procedure name: mnuTimelineCollapse_Click
  2633.             ' * procedure description:  Occurs when the timeline popup context menu's 'Collapse' option is elected
  2634.             ' *
  2635.             ' ******************************************************************************************************************************
  2636.             Private Sub mnuTimelineCollapse_Click()
  2637.             On Local Error GoTo ErrLine
  2638.             
  2639.             'collapse the treeview
  2640.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  2641.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  2642.                   tvwSimpleTree.SelectedItem.Expanded = False
  2643.                   If mnuTimelineExpand.Enabled = False Then mnuTimelineExpand.Enabled = True
  2644.                   If mnuTimelineCollapse.Enabled = True Then mnuTimelineCollapse.Enabled = False
  2645.                End If
  2646.             End If
  2647.             Exit Sub
  2648.             
  2649. ErrLine:
  2650.             Err.Clear
  2651.             Exit Sub
  2652.             End Sub
  2653.             
  2654.             
  2655.             ' ******************************************************************************************************************************
  2656.             ' * procedure name: mnuTimelineExpand_Click
  2657.             ' * procedure description:  Occurs when the timeline popup context menu's 'Expand' option is elected
  2658.             ' *
  2659.             ' ******************************************************************************************************************************
  2660.             Private Sub mnuTimelineExpand_Click()
  2661.             On Local Error GoTo ErrLine
  2662.             
  2663.             'expand the treeview
  2664.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  2665.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  2666.                   tvwSimpleTree.SelectedItem.Expanded = True
  2667.                   If mnuTimelineExpand.Enabled = True Then mnuTimelineExpand.Enabled = False
  2668.                   If mnuTimelineCollapse.Enabled = False Then mnuTimelineCollapse.Enabled = True
  2669.                End If
  2670.             End If
  2671.             Exit Sub
  2672.             
  2673. ErrLine:
  2674.             Err.Clear
  2675.             Exit Sub
  2676.             End Sub
  2677.             
  2678.             
  2679.             ' ******************************************************************************************************************************
  2680.             ' * procedure name: mnuTimeLineClearRenderEngine_Click
  2681.             ' * procedure description:  Occurs when the timeline popup context menu's 'ClearRenderEngine' option is elected
  2682.             ' *
  2683.             ' ******************************************************************************************************************************
  2684.             Private Sub mnuTimeLineClearRenderEngine_Click()
  2685.             On Local Error GoTo ErrLine
  2686.             
  2687.             'dereference & clean-up
  2688.             If Not gbl_objFilterGraph Is Nothing Then Set gbl_objFilterGraph = Nothing
  2689.             If Not gbl_objRenderEngine Is Nothing Then Call gbl_objRenderEngine.ScrapIt
  2690.             If Not gbl_objRenderEngine Is Nothing Then Set gbl_objRenderEngine = Nothing
  2691.             
  2692.             'disable popup context menu(s)
  2693.             If mnuTimeLineRenderTimeLine.Enabled = False Then mnuTimeLineRenderTimeLine.Enabled = True
  2694.             If mnuTimeLineClearRenderEngine.Enabled = True Then mnuTimeLineClearRenderEngine.Enabled = False
  2695.             Exit Sub
  2696.             
  2697. ErrLine:
  2698.             Err.Clear
  2699.             Exit Sub
  2700.             End Sub
  2701.             
  2702.             
  2703.             ' ******************************************************************************************************************************
  2704.             ' * procedure name: mnuTimeLineEdit_Click
  2705.             ' * procedure description:  Occurs when the timeline popup context menu's 'Edit' option is elected
  2706.             ' *
  2707.             ' ******************************************************************************************************************************
  2708.             Private Sub mnuTimeLineEdit_Click()
  2709.             Dim nDirty As Long
  2710.             Dim nInsertMode As Long
  2711.             Dim dblDuration As Double
  2712.             Dim nEffectsEnabled As Long
  2713.             Dim dblDefaultFPS As Double
  2714.             Dim bstrDefaultEffect As String
  2715.             Dim nTransitionsEnabled As Long
  2716.             Dim bstrDefaultTransition As String
  2717.             On Local Error GoTo ErrLine
  2718.             
  2719.             'obtain existing timeline information
  2720.             If Not gbl_objTimeline Is Nothing Then
  2721.                With gbl_objTimeline
  2722.                   .GetInsertMode nInsertMode
  2723.                   .TransitionsEnabled nTransitionsEnabled
  2724.                   .EffectsEnabled nEffectsEnabled
  2725.                   .GetDefaultFPS dblDefaultFPS
  2726.                   .IsDirty nDirty
  2727.                   bstrDefaultTransition = .GetDefaultTransitionB
  2728.                   bstrDefaultEffect = .GetDefaultEffectB
  2729.                End With
  2730.             End If
  2731.             
  2732.             'hide the dialog
  2733.             Load frmTimeline
  2734.             frmTimeline.Visible = False
  2735.             
  2736.             'update the form with the existing information
  2737.             With frmTimeline
  2738.                .txtInsertMode.Text = CStr(nInsertMode)
  2739.                .txtTransitionsEnabled.Text = CStr(nTransitionsEnabled)
  2740.                .txtEffectsEnabled.Text = CStr(nEffectsEnabled)
  2741.                .txtDuration.Text = CStr(dblDuration)
  2742.                .txtDefaultFPS.Text = CStr(dblDefaultFPS)
  2743.                .txtDirty.Text = CStr(nDirty)
  2744.                .cmbDefaultTransition.Text = CStr(TransitionCLSIDToFriendlyName(bstrDefaultTransition))
  2745.                .cmbDefaultEffect.Text = CStr(EffectCLSIDToFriendlyName(bstrDefaultEffect))
  2746.             End With
  2747.             
  2748.             'display the dialog
  2749.             frmTimeline.Caption = "Edit Timeline"
  2750.             frmTimeline.txtDuration.Enabled = False
  2751.             frmTimeline.Show vbModal, Me
  2752.             
  2753.             'wait until the user closes the dialog
  2754.             Do Until frmTimeline.Visible = False: DoEvents
  2755.             Loop
  2756.             'determine if they canceled out
  2757.             If frmTimeline.UnloadMode = 1 Then
  2758.                Unload frmTimeline: Set frmTimeline = Nothing: Exit Sub
  2759.             End If
  2760.             
  2761.             'update the timeline info given the new information
  2762.             With gbl_objTimeline
  2763.                If IsNumeric(frmTimeline.txtTransitionsEnabled.Text) Then
  2764.                   .EnableTransitions CLng(frmTimeline.txtTransitionsEnabled.Text)
  2765.                End If
  2766.                If IsNumeric(frmTimeline.txtEffectsEnabled.Text) Then
  2767.                   .EnableEffects CLng(frmTimeline.txtEffectsEnabled.Text)
  2768.                End If
  2769.                If IsNumeric(frmTimeline.txtDefaultFPS.Text) Then
  2770.                   .SetDefaultFPS CDbl(frmTimeline.txtDefaultFPS.Text)
  2771.                End If
  2772.                If TransitionFriendlyNameToCLSID(frmTimeline.cmbDefaultTransition.Text) <> vbNullString Then
  2773.                .SetDefaultTransitionB CStr(TransitionFriendlyNameToCLSID(frmTimeline.cmbDefaultTransition.Text))
  2774.                End If
  2775.                If EffectFriendlyNameToCLSID(frmTimeline.cmbDefaultEffect.Text) <> vbNullString Then
  2776.                   .SetDefaultEffectB CStr(EffectFriendlyNameToCLSID(frmTimeline.cmbDefaultEffect.Text))
  2777.                End If
  2778.             End With
  2779.             
  2780.             'refresh the ide
  2781.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2782.             
  2783.             'destroy the dialog
  2784.             Unload frmTimeline: Set frmTimeline = Nothing
  2785.             Exit Sub
  2786.             
  2787. ErrLine:
  2788.             Err.Clear
  2789.             Exit Sub
  2790.             End Sub
  2791.             
  2792.             
  2793.             ' ******************************************************************************************************************************
  2794.             ' * procedure name: mnuTimeLineInsertGroup_Click
  2795.             ' * procedure description:  Occurs when the timeline popup context menu's 'Insert Group' option is elected
  2796.             ' *
  2797.             ' ******************************************************************************************************************************
  2798.             Private Sub mnuTimeLineInsertGroup_Click()
  2799.             Dim nPriority As Long
  2800.             Dim nBuffering As Long
  2801.             Dim nMediaType As Long
  2802.             Dim dblOutputFPS As Double
  2803.             Dim nPreviewMode As Long
  2804.             Dim bstrGroupName As String
  2805.             Dim objNewGroup As AMTimelineGroup
  2806.             On Local Error GoTo ErrLine
  2807.             
  2808.             'display the dialog
  2809.             frmGroup.Caption = "Insert Group"
  2810.             Call frmGroup.Show(vbModal, Me)
  2811.             
  2812.             'wait until the user closes the dialog
  2813.             Do Until frmGroup.Visible = False: DoEvents
  2814.             Loop
  2815.             'verify unload mode
  2816.             If frmGroup.UnloadMode = 1 Then
  2817.                Unload frmGroup: Set frmGroup = Nothing: Exit Sub
  2818.             End If
  2819.             
  2820.             'obtain the values the user entered into the dialog
  2821.             With frmGroup
  2822.                If IsNumeric(.txtPriority.Text) Then
  2823.                   nPriority = CLng(.txtPriority.Text)
  2824.                End If
  2825.                If IsNumeric(.txtBuffering.Text) Then
  2826.                   nBuffering = CLng(.txtBuffering.Text)
  2827.                End If
  2828.                If IsNumeric(.txtMediaType.Text) Then
  2829.                   nMediaType = CLng(.txtMediaType.Text)
  2830.                End If
  2831.                If IsNumeric(.txtOutputFPS.Text) Then
  2832.                   dblOutputFPS = CDbl(.txtOutputFPS.Text)
  2833.                End If
  2834.                If IsNumeric(.txtPreviewMode.Text) Then
  2835.                   nPreviewMode = CLng(.txtPreviewMode.Text)
  2836.                End If
  2837.                If .txtGroupName.Text <> vbNullString Then
  2838.                   bstrGroupName = CStr(.txtGroupName.Text)
  2839.                End If
  2840.             End With
  2841.             
  2842.             'insert the new group into the application timeline
  2843.             Set objNewGroup = _
  2844.             CreateGroup(gbl_objTimeline, bstrGroupName, nMediaType, dblOutputFPS, nPreviewMode, nBuffering)
  2845.             If Not objNewGroup Is Nothing Then Call InsertGroup(gbl_objTimeline, objNewGroup)
  2846.             
  2847.             'refresh ide
  2848.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2849.             
  2850.             'update the button(s)
  2851.            With tbMain.Buttons
  2852.               .Item("New").Enabled = True
  2853.               .Item("Open").Enabled = True
  2854.               .Item("Save").Enabled = True
  2855.               .Item("Play").Enabled = True
  2856.               .Item("Pause").Enabled = False
  2857.               .Item("Stop").Enabled = False
  2858.               .Item("Rewind").Enabled = False
  2859.               .Item("FastForward").Enabled = False
  2860.               .Item("SeekForward").Enabled = False
  2861.               .Item("SeekBackward").Enabled = False
  2862.            End With
  2863.            
  2864.             'update the state on the popup context menu
  2865.             mnuFileSaveAs.Enabled = True
  2866.             mnuTimeLinePlay.Enabled = True
  2867.             mnuTimeLineStop.Enabled = False
  2868.             mnuTimeLinePause.Enabled = False
  2869.             mnuTimeLineRenderTimeLine.Enabled = True
  2870.             mnuTimeLineClearRenderEngine.Enabled = True
  2871.             
  2872.             'unload the dialog
  2873.             Unload frmGroup: Set frmGroup = Nothing
  2874.             Exit Sub
  2875.             
  2876. ErrLine:
  2877.             Err.Clear
  2878.             Exit Sub
  2879.             End Sub
  2880.             
  2881.             
  2882.             ' ******************************************************************************************************************************
  2883.             ' * procedure name: mnuTimeLinePause_Click
  2884.             ' * procedure description:  Occurs when the timeline popup context menu's 'Pause' option is elected
  2885.             ' *
  2886.             ' ******************************************************************************************************************************
  2887.             Private Sub mnuTimelinePause_Click()
  2888.             On Local Error GoTo ErrLine
  2889.             
  2890.             'dupe the funtionality of a 'pause' button click
  2891.             Call tbMain_ButtonClick(tbMain.Buttons("Pause"))
  2892.             Exit Sub
  2893.             
  2894. ErrLine:
  2895.             Err.Clear
  2896.             Exit Sub
  2897.             End Sub
  2898.             
  2899.             
  2900.             ' ******************************************************************************************************************************
  2901.             ' * procedure name: mnuTimeLinePlay_Click
  2902.             ' * procedure description:  Occurs when the timeline popup context menu's 'Play' option is elected
  2903.             ' *
  2904.             ' ******************************************************************************************************************************
  2905.             Private Sub mnuTimelinePlay_Click()
  2906.             On Local Error GoTo ErrLine
  2907.             
  2908.             'dupe the funtionality of a 'play' button click
  2909.             Call tbMain_ButtonClick(tbMain.Buttons("Play"))
  2910.             Exit Sub
  2911.             
  2912. ErrLine:
  2913.             Err.Clear
  2914.             Exit Sub
  2915.             End Sub
  2916.             
  2917.             
  2918.             ' ******************************************************************************************************************************
  2919.             ' * procedure name: mnuTimeLineRenderTimeLine_Click
  2920.             ' * procedure description:  Occurs when the timeline popup context menu's 'RenderTimeline' option is elected
  2921.             ' *
  2922.             ' ******************************************************************************************************************************
  2923.             Private Sub mnuTimeLineRenderTimeLine_Click()
  2924.             On Local Error GoTo ErrLine
  2925.             
  2926.             'refresh ide
  2927.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  2928.             
  2929.             'connect front end
  2930.             Call gbl_objRenderEngine.ConnectFrontEnd
  2931.             
  2932.             'enable/disable popup context menu's
  2933.             mnuTimeLineRenderTimeLine.Enabled = False
  2934.             mnuTimeLineClearRenderEngine.Enabled = True
  2935.             Exit Sub
  2936.             
  2937. ErrLine:
  2938.             Err.Clear
  2939.             Exit Sub
  2940.             End Sub
  2941.             
  2942.             
  2943.             ' ******************************************************************************************************************************
  2944.             ' * procedure name: mnuTimeLineStop_Click
  2945.             ' * procedure description:  Occurs when the timeline popup context menu's 'Stop' option is elected
  2946.             ' *
  2947.             ' ******************************************************************************************************************************
  2948.             Private Sub mnuTimelineStop_Click()
  2949.             On Local Error GoTo ErrLine
  2950.             
  2951.             'dupe the funtionality of a 'stop' button click
  2952.             Call tbMain_ButtonClick(tbMain.Buttons("Stop"))
  2953.             Exit Sub
  2954.             
  2955. ErrLine:
  2956.             Err.Clear
  2957.             Exit Sub
  2958.             End Sub
  2959.             
  2960.             
  2961.             ' ******************************************************************************************************************************
  2962.             ' * procedure name: mnuTrack_Click
  2963.             ' * procedure description:  Occurs when the track popup context menu is invoked
  2964.             ' *
  2965.             ' ******************************************************************************************************************************
  2966.             Private Sub mnuTrack_Click()
  2967.             On Local Error GoTo ErrLine
  2968.             
  2969.             'set menu state
  2970.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  2971.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  2972.                   If mnuTrackExpand.Enabled = True Then mnuTrackExpand.Enabled = False
  2973.                   If mnuTrackCollapse.Enabled = True Then mnuTrackCollapse.Enabled = False
  2974.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  2975.                   If mnuTrackExpand.Enabled = True Then mnuTrackExpand.Enabled = False
  2976.                   If mnuTrackCollapse.Enabled = False Then mnuTrackCollapse.Enabled = True
  2977.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  2978.                   If mnuTrackExpand.Enabled = False Then mnuTrackExpand.Enabled = True
  2979.                   If mnuTrackCollapse.Enabled = True Then mnuTrackCollapse.Enabled = False
  2980.                Else
  2981.                   If mnuTrackExpand.Enabled = True Then mnuTrackExpand.Enabled = False
  2982.                   If mnuTrackCollapse.Enabled = True Then mnuTrackCollapse.Enabled = False
  2983.                End If
  2984.             End If
  2985.             Exit Sub
  2986.             
  2987. ErrLine:
  2988.             Err.Clear
  2989.             Exit Sub
  2990.             End Sub
  2991.             
  2992.             
  2993.             ' ******************************************************************************************************************************
  2994.             ' * procedure name: mnuTrackCollapse_Click
  2995.             ' * procedure description:  Occurs when the track popup context menu's 'Collapse' option is elected
  2996.             ' *
  2997.             ' ******************************************************************************************************************************
  2998.             Private Sub mnuTrackCollapse_Click()
  2999.             On Local Error GoTo ErrLine
  3000.             
  3001.             'collapse the treeview
  3002.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  3003.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  3004.                   tvwSimpleTree.SelectedItem.Expanded = False
  3005.                   If mnuTrackExpand.Enabled = False Then mnuTrackExpand.Enabled = True
  3006.                   If mnuTrackCollapse.Enabled = True Then mnuTrackCollapse.Enabled = False
  3007.                End If
  3008.             End If
  3009.             Exit Sub
  3010.             
  3011. ErrLine:
  3012.             Err.Clear
  3013.             Exit Sub
  3014.             End Sub
  3015.             
  3016.             
  3017.             ' ******************************************************************************************************************************
  3018.             ' * procedure name: mnuTrackExpand_Click
  3019.             ' * procedure description:  Occurs when the track popup context menu's 'Expand' option is elected
  3020.             ' *
  3021.             ' ******************************************************************************************************************************
  3022.             Private Sub mnuTrackExpand_Click()
  3023.             On Local Error GoTo ErrLine
  3024.             
  3025.             'expand the treeview
  3026.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  3027.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  3028.                   tvwSimpleTree.SelectedItem.Expanded = True
  3029.                   If mnuTrackExpand.Enabled = True Then mnuTrackExpand.Enabled = False
  3030.                   If mnuTrackCollapse.Enabled = False Then mnuTrackCollapse.Enabled = True
  3031.                End If
  3032.             End If
  3033.             Exit Sub
  3034.             
  3035. ErrLine:
  3036.             Err.Clear
  3037.             Exit Sub
  3038.             End Sub
  3039.             
  3040.             
  3041.             ' ******************************************************************************************************************************
  3042.             ' * procedure name: mnuTrackAddClip_Click
  3043.             ' * procedure description:  Occurs when the track popup context menu's 'Add Clip' option is elected
  3044.             ' *
  3045.             ' ******************************************************************************************************************************
  3046.             Private Sub mnuTrackAddClip_Click()
  3047.             Dim nMuted As Long
  3048.             Dim dblFPS As Double
  3049.             Dim dblTStop As Double
  3050.             Dim dblTStart As Double
  3051.             Dim dblMStart As Double
  3052.             Dim dblMStop As Double
  3053.             Dim nStretchMode As Long
  3054.             Dim nStreamNumber As Long
  3055.             Dim dblMediaLength As Double
  3056.             Dim bstrMediaSourceName As String
  3057.             Dim objNewSourceClip As AMTimelineSrc
  3058.             On Local Error GoTo ErrLine
  3059.             
  3060.             'display the dialog
  3061.             frmClip.Caption = "Add Clip"
  3062.             frmClip.Show vbModal, Me
  3063.             
  3064.             'wait until the user closes the dialog
  3065.             Do Until frmClip.Visible = False: DoEvents
  3066.             Loop
  3067.             'verify unload mode
  3068.             If frmClip.UnloadMode = 1 Then
  3069.                Unload frmClip: Set frmClip = Nothing: Exit Sub
  3070.             End If
  3071.             
  3072.             'obtain the user input from the dialog
  3073.             With frmClip
  3074.                If IsNumeric(.txtMStart.Text) Then
  3075.                   dblMStart = CDbl(.txtMStart.Text)
  3076.                End If
  3077.                If IsNumeric(.txtTStop.Text) Then
  3078.                   dblMStop = CDbl(.txtTStop.Text)
  3079.                End If
  3080.                If IsNumeric(.txtTStart.Text) Then
  3081.                   dblTStart = CDbl(.txtTStart.Text)
  3082.                End If
  3083.                If IsNumeric(.txtTStop.Text) Then
  3084.                   dblTStop = CDbl(.txtTStop.Text)
  3085.                End If
  3086.                If IsNumeric(.txtMediaLength.Text) Then
  3087.                   dblMediaLength = CDbl(.txtMediaLength.Text)
  3088.                End If
  3089.                If IsNumeric(.txtStreamNumber.Text) Then
  3090.                   nStreamNumber = CLng(.txtStreamNumber.Text)
  3091.                End If
  3092.                If IsNumeric(.txtFPS.Text) Then
  3093.                   dblFPS = CDbl(.txtFPS.Text)
  3094.                End If
  3095.                If IsNumeric(.txtStretchMode.Text) Then
  3096.                   nStretchMode = CLng(.txtStretchMode.Text)
  3097.                End If
  3098.                If IsNumeric(.txtMuted.Text) Then
  3099.                   nMuted = CLng(.txtMuted.Text)
  3100.                End If
  3101.                If .txtMediaName <> vbNullString Then
  3102.                   bstrMediaSourceName = CStr(.txtMediaName)
  3103.                End If
  3104.             End With
  3105.             
  3106.             'insert the new clip into the timeline
  3107.             If Not gbl_objTimeline Is Nothing Then
  3108.                Set objNewSourceClip = CreateSource(gbl_objTimeline)
  3109.                If Not objNewSourceClip Is Nothing Then Call InsertSource(gbl_objDexterObject, objNewSourceClip, bstrMediaSourceName, dblTStart, dblTStop, dblMStart, dblMStop)
  3110.                If Not objNewSourceClip Is Nothing Then
  3111.                   'refresh the ide
  3112.                   Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  3113.                   
  3114.                   'update the button(s)
  3115.                   With tbMain.Buttons
  3116.                      .Item("Play").Enabled = True
  3117.                      .Item("Pause").Enabled = False
  3118.                      .Item("Stop").Enabled = False
  3119.                      .Item("Rewind").Enabled = False
  3120.                      .Item("FastForward").Enabled = False
  3121.                      .Item("SeekForward").Enabled = False
  3122.                      .Item("SeekBackward").Enabled = False
  3123.                   End With
  3124.            
  3125.                   'update the state on the popup context menu
  3126.                   mnuTimeLinePlay.Enabled = True
  3127.                   mnuTimeLineStop.Enabled = False
  3128.                   mnuTimeLinePause.Enabled = False
  3129.                   mnuTimeLineRenderTimeLine.Enabled = True
  3130.                   mnuTimeLineClearRenderEngine.Enabled = True
  3131.                End If
  3132.             End If
  3133.             
  3134.             'destroy dialog
  3135.             Unload frmClip: Set frmClip = Nothing
  3136.             Exit Sub
  3137.             
  3138. ErrLine:
  3139.             Err.Clear
  3140.             Exit Sub
  3141.             End Sub
  3142.             
  3143.             
  3144.             ' ******************************************************************************************************************************
  3145.             ' * procedure name: mnuTrackAddEffect_Click
  3146.             ' * procedure description:  Occurs when the track popup context menu's 'Add Effect' option is elected
  3147.             ' *
  3148.             ' ******************************************************************************************************************************
  3149.             Private Sub mnuTrackAddEffect_Click()
  3150.             Dim nEffectPriority As Long
  3151.             Dim bstrEffectGUID As String
  3152.             Dim dblEffectStopTime As Double
  3153.             Dim dblEffectStartTime As Double
  3154.             Dim objNewEffect As AMTimelineEffect
  3155.             Dim objTimelineObject As AMTimelineObj
  3156.             On Local Error GoTo ErrLine
  3157.             
  3158.             'display the insert effect dialog
  3159.             frmEffect.Caption = "Add Effect"
  3160.             frmEffect.Show vbModal, Me
  3161.             
  3162.             'wait until the user closes the dialog
  3163.             Do: DoEvents
  3164.             If frmEffect.Visible = False Then Exit Do
  3165.             Loop
  3166.             'verify unload mode
  3167.             If frmEffect.UnloadMode = 1 Then
  3168.                Unload frmEffect: Set frmEffect = Nothing: Exit Sub
  3169.             End If
  3170.             
  3171.             'query the dialog information
  3172.             With frmEffect
  3173.                If IsNumeric(.txtStartTime.Text) Then
  3174.                   dblEffectStartTime = CDbl(.txtStartTime.Text)
  3175.                End If
  3176.                If IsNumeric(.txtStopTime.Text) Then
  3177.                   dblEffectStopTime = CDbl(.txtStopTime.Text)
  3178.                End If
  3179.                If IsNumeric(.txtPriority.Text) Then
  3180.                   nEffectPriority = CLng(.txtPriority.Text)
  3181.                End If
  3182.                If .cmbEffect.Text <> vbNullString Then
  3183.                   bstrEffectGUID = CStr(.cmbEffect.Text)
  3184.                End If
  3185.             End With
  3186.             
  3187.             'insert the effect into the timeline
  3188.             If Not gbl_objTimeline Is Nothing Then
  3189.                Set objNewEffect = CreateEffect(gbl_objTimeline)
  3190.                If Not objNewEffect Is Nothing Then Call InsertEffect(objNewEffect, gbl_objDexterObject, EffectFriendlyNameToCLSID(bstrEffectGUID), dblEffectStartTime, dblEffectStopTime)
  3191.                'refresh the ide
  3192.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  3193.             End If
  3194.             
  3195.             'destroy the dialog
  3196.             Unload frmEffect: Set frmEffect = Nothing
  3197.             Exit Sub
  3198.             
  3199. ErrLine:
  3200.             Err.Clear
  3201.             Exit Sub
  3202.             End Sub
  3203.             
  3204.             
  3205.             ' ******************************************************************************************************************************
  3206.             ' * procedure name: mnuTrackAddTransition_Click
  3207.             ' * procedure description:  Occurs when the track popup context menu's 'Add Transition' option is elected
  3208.             ' *
  3209.             ' ******************************************************************************************************************************
  3210.             Private Sub mnuTrackAddTransition_Click()
  3211.             Dim nCutpoint As Long
  3212.             Dim nCutsOnly As Long
  3213.             Dim nSwapInputs As Long
  3214.             Dim bstrTransition As String
  3215.             Dim dblStartTime As Double
  3216.             Dim dblStopTime As Double
  3217.             Dim objNewTransition As AMTimelineTrans
  3218.             On Local Error GoTo ErrLine
  3219.             
  3220.             'display the dialog
  3221.             frmTransitions.Caption = "Add Transition"
  3222.             frmTransitions.Show vbModal, Me
  3223.             
  3224.             'wait until the user closes the dialog
  3225.             Do Until frmTransitions.Visible = False: DoEvents
  3226.             Loop
  3227.             'verify unload mode
  3228.             If frmTransitions.UnloadMode = 1 Then
  3229.                Unload frmTransitions: Set frmTransitions = Nothing: Exit Sub
  3230.             End If
  3231.             
  3232.             'obtain user input
  3233.             With frmTransitions
  3234.                If IsNumeric(.txtCutpoint.Text) Then
  3235.                   nCutpoint = CLng(.txtCutpoint.Text)
  3236.                End If
  3237.                If IsNumeric(.txtCutsOnly.Text) Then
  3238.                   nCutsOnly = CLng(.txtCutsOnly.Text)
  3239.                End If
  3240.                If IsNumeric(.txtSwapInputs.Text) Then
  3241.                   nSwapInputs = CLng(.txtSwapInputs.Text)
  3242.                End If
  3243.                If IsNumeric(.txtStartTime.Text) Then
  3244.                   dblStartTime = CDbl(.txtStartTime.Text)
  3245.                End If
  3246.                If IsNumeric(.txtStopTime.Text) Then
  3247.                   dblStopTime = CDbl(.txtStopTime.Text)
  3248.                End If
  3249.                If .cmbTransition.Text <> vbNullString Then
  3250.                   bstrTransition = CStr(.cmbTransition.Text)
  3251.                End If
  3252.             End With
  3253.             
  3254.             'insert the transition into the timeline
  3255.             If Not gbl_objTimeline Is Nothing Then
  3256.                Set objNewTransition = CreateTransition(gbl_objTimeline)
  3257.                If Not objNewTransition Is Nothing Then Call InsertTransition(objNewTransition, gbl_objDexterObject, TransitionFriendlyNameToCLSID(bstrTransition), dblStartTime, dblStopTime)
  3258.                'refresh the ide
  3259.                Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  3260.             End If
  3261.             
  3262.             'destroy the dialog
  3263.             Unload frmTransitions: Set frmTransitions = Nothing
  3264.             Exit Sub
  3265.             
  3266. ErrLine:
  3267.             Err.Clear
  3268.             Exit Sub
  3269.             End Sub
  3270.             
  3271.             
  3272.             ' ******************************************************************************************************************************
  3273.             ' * procedure name: mnuTrackDelete_Click
  3274.             ' * procedure description:  Occurs when the track popup context menu's 'Delete' option is elected
  3275.             ' *
  3276.             ' ******************************************************************************************************************************
  3277.             Private Sub mnuTrackDelete_Click()
  3278.             Dim objTrack As AMTimelineTrack
  3279.             On Local Error GoTo ErrLine
  3280.             
  3281.             'obtain the track from the global timeline object
  3282.             'which is reset when the user clicks a node on the tree
  3283.             If Not gbl_objDexterObject Is Nothing Then
  3284.                Set objTrack = gbl_objDexterObject
  3285.             Else: Exit Sub
  3286.             End If
  3287.             
  3288.             'remove the item
  3289.             Call gbl_objDexterObject.RemoveAll
  3290.             Call gbl_colNormalEnum.Remove(tvwSimpleTree.SelectedItem.Key)
  3291.             Call tvwSimpleTree.Nodes.Remove(tvwSimpleTree.SelectedItem.Index)
  3292.             If Not gbl_objDexterObject Is Nothing Then Set gbl_objDexterObject = Nothing
  3293.             
  3294.             'clean-up & dereference
  3295.             If Not objTrack Is Nothing Then Set objTrack = Nothing
  3296.             Exit Sub
  3297.             
  3298. ErrLine:
  3299.             Err.Clear
  3300.             Exit Sub
  3301.             End Sub
  3302.             
  3303.             
  3304.             ' ******************************************************************************************************************************
  3305.             ' * procedure name: mnuTrackEdit_Click
  3306.             ' * procedure description:  Occurs when the track popup context menu's 'Edit' option is elected
  3307.             ' *
  3308.             ' ******************************************************************************************************************************
  3309.             Private Sub mnuTrackEdit_Click()
  3310.             Dim nBlank As Long
  3311.             Dim nMuted As Long
  3312.             Dim nPriority As Long
  3313.             Dim dblStopTime As Double
  3314.             Dim dblStartTime As Double
  3315.             Dim objTrack As AMTimelineTrack
  3316.             On Local Error GoTo ErrLine
  3317.             
  3318.             'obtain the track from the global timeline object
  3319.             'which is reset when the user clicks a node on the tree
  3320.             If Not gbl_objDexterObject Is Nothing Then
  3321.                Set objTrack = gbl_objDexterObject
  3322.             Else: Exit Sub
  3323.             End If
  3324.             
  3325.             'obtain existing group information
  3326.             If Not objTrack Is Nothing Then
  3327.                With objTrack
  3328.                   'get blank
  3329.                   Call objTrack.AreYouBlank(nBlank)
  3330.                   'get muted
  3331.                   Call gbl_objDexterObject.GetMuted(nMuted)
  3332.                   'get start /stoptime
  3333.                   Call gbl_objDexterObject.GetStartStop2(dblStartTime, dblStopTime)
  3334.                End With
  3335.             End If
  3336.             
  3337.             'hide the dialog
  3338.             Load frmTrack
  3339.             frmTrack.Visible = False
  3340.             
  3341.             'update the form with the existing information
  3342.             With frmTrack
  3343.                .txtPriority = 0  'methodology not available
  3344.                .txtStartTime = CStr(dblStartTime)
  3345.                .txtStopTime = CStr(dblStopTime)
  3346.                .txtBlank.Text = CStr(nBlank)
  3347.                .txtMuted.Text = CStr(nMuted)
  3348.             End With
  3349.             
  3350.             'display the dialog
  3351.             frmTrack.Caption = "Edit Track"
  3352.             frmTrack.Show vbModal, Me
  3353.             
  3354.             'wait until the user closes the dialog
  3355.             Do Until frmTrack.Visible = False: DoEvents
  3356.             Loop
  3357.             'verify unload mode
  3358.             If frmTrack.UnloadMode = 1 Then
  3359.                Unload frmTrack: Set frmTrack = Nothing: Exit Sub
  3360.             End If
  3361.             
  3362.             'query the dialog information
  3363.             With frmTrack
  3364.                If IsNumeric(.txtStartTime.Text) Then
  3365.                   dblStartTime = CDbl(.txtStartTime.Text)
  3366.                End If
  3367.                If IsNumeric(.txtStopTime.Text) Then
  3368.                   dblStopTime = CDbl(.txtStopTime.Text)
  3369.                End If
  3370.                If IsNumeric(.txtPriority.Text) Then
  3371.                   nPriority = CLng(.txtPriority.Text)
  3372.                End If
  3373.                If .txtBlank.Text <> vbNullString Then
  3374.                   nBlank = CStr(.txtBlank.Text)
  3375.                End If
  3376.                If .txtMuted.Text <> vbNullString Then
  3377.                   nMuted = CStr(.txtMuted.Text)
  3378.                End If
  3379.             End With
  3380.             
  3381.             'update the timeline info given the new information
  3382.             If Not gbl_objDexterObject Is Nothing Then
  3383.                'set the muted state
  3384.                Call gbl_objDexterObject.SetMuted(nMuted)
  3385.                'set the media times
  3386.                Call gbl_objDexterObject.SetStartStop2(dblStartTime, dblStopTime)
  3387.             End If
  3388.             
  3389.             'refresh the ide
  3390.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  3391.             
  3392.             'destroy the dialog
  3393.             Unload frmTrack: Set frmTrack = Nothing
  3394.             Exit Sub
  3395.             
  3396. ErrLine:
  3397.             Err.Clear
  3398.             Exit Sub
  3399.             End Sub
  3400.             
  3401.             
  3402.             ' ******************************************************************************************************************************
  3403.             ' * procedure name: mnuTrans_Click
  3404.             ' * procedure description:  Occurs when the transition popup context menu is invoked
  3405.             ' *
  3406.             ' ******************************************************************************************************************************
  3407.             Private Sub mnuTrans_Click()
  3408.             On Local Error GoTo ErrLine
  3409.             
  3410.             'set menu state
  3411.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  3412.                If tvwSimpleTree.SelectedItem.Children = 0 Then
  3413.                   If mnuTransExpand.Enabled = True Then mnuTransExpand.Enabled = False
  3414.                   If mnuTransCollapse.Enabled = True Then mnuTransCollapse.Enabled = False
  3415.                ElseIf tvwSimpleTree.SelectedItem.Expanded = True Then
  3416.                   If mnuTransExpand.Enabled = True Then mnuTransExpand.Enabled = False
  3417.                   If mnuTransCollapse.Enabled = False Then mnuTransCollapse.Enabled = True
  3418.                ElseIf tvwSimpleTree.SelectedItem.Expanded = False Then
  3419.                   If mnuTransExpand.Enabled = False Then mnuTransExpand.Enabled = True
  3420.                   If mnuTransCollapse.Enabled = True Then mnuTransCollapse.Enabled = False
  3421.                Else
  3422.                   If mnuTransExpand.Enabled = True Then mnuTransExpand.Enabled = False
  3423.                   If mnuTransCollapse.Enabled = True Then mnuTransCollapse.Enabled = False
  3424.                End If
  3425.             End If
  3426.             Exit Sub
  3427.             
  3428. ErrLine:
  3429.             Err.Clear
  3430.             Exit Sub
  3431.             End Sub
  3432.             
  3433.             
  3434.             ' ******************************************************************************************************************************
  3435.             ' * procedure name: mnuTransCollapse_Click
  3436.             ' * procedure description:  Occurs when the transition popup context menu's 'Collapse' option is elected
  3437.             ' *
  3438.             ' ******************************************************************************************************************************
  3439.             Private Sub mnuTransCollapse_Click()
  3440.             On Local Error GoTo ErrLine
  3441.             
  3442.             'collapse the treeview
  3443.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  3444.                If tvwSimpleTree.SelectedItem.Expanded = True Then
  3445.                   tvwSimpleTree.SelectedItem.Expanded = False
  3446.                   If mnuTransExpand.Enabled = False Then mnuTransExpand.Enabled = True
  3447.                   If mnuTransCollapse.Enabled = True Then mnuTransCollapse.Enabled = False
  3448.                End If
  3449.             End If
  3450.             Exit Sub
  3451.             
  3452. ErrLine:
  3453.             Err.Clear
  3454.             Exit Sub
  3455.             End Sub
  3456.             
  3457.             
  3458.             ' ******************************************************************************************************************************
  3459.             ' * procedure name: mnuTransExpand_Click
  3460.             ' * procedure description:  Occurs when the transition popup context menu's 'Expand' option is elected
  3461.             ' *
  3462.             ' ******************************************************************************************************************************
  3463.             Private Sub mnuTransExpand_Click()
  3464.             On Local Error GoTo ErrLine
  3465.             
  3466.             'expand the treeview
  3467.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  3468.                If tvwSimpleTree.SelectedItem.Expanded = False Then
  3469.                   tvwSimpleTree.SelectedItem.Expanded = True
  3470.                   If mnuTransExpand.Enabled = True Then mnuTransExpand.Enabled = False
  3471.                   If mnuTransCollapse.Enabled = False Then mnuTransCollapse.Enabled = True
  3472.                End If
  3473.             End If
  3474.             Exit Sub
  3475.             
  3476. ErrLine:
  3477.             Err.Clear
  3478.             Exit Sub
  3479.             End Sub
  3480.             
  3481.             
  3482.             ' ******************************************************************************************************************************
  3483.             ' * procedure name: mnuTransDelete_Click
  3484.             ' * procedure description:  Occurs when the transition popup context menu's 'Delete' option is elected
  3485.             ' *
  3486.             ' ******************************************************************************************************************************
  3487.             Private Sub mnuTransDelete_Click()
  3488.             Dim objTransition As AMTimelineTrans
  3489.             On Local Error GoTo ErrLine
  3490.             
  3491.             'obtain the transition from the global timeline object
  3492.             'which is reset when the user clicks a node on the tree
  3493.             If Not gbl_objDexterObject Is Nothing Then
  3494.                Set objTransition = gbl_objDexterObject
  3495.             Else: Exit Sub
  3496.             End If
  3497.             'remove the item
  3498.             Call gbl_objDexterObject.RemoveAll
  3499.             Call gbl_colNormalEnum.Remove(tvwSimpleTree.SelectedItem.Key)
  3500.             Call tvwSimpleTree.Nodes.Remove(tvwSimpleTree.SelectedItem.Index)
  3501.             If Not gbl_objDexterObject Is Nothing Then Set gbl_objDexterObject = Nothing
  3502.             
  3503.             'clean-up & dereference
  3504.             If Not objTransition Is Nothing Then Set objTransition = Nothing
  3505.             Exit Sub
  3506.             
  3507. ErrLine:
  3508.             Err.Clear
  3509.             Exit Sub
  3510.             End Sub
  3511.             
  3512.             
  3513.             ' ******************************************************************************************************************************
  3514.             ' * procedure name: mnuTransEdit_Click
  3515.             ' * procedure description:  Occurs when the transition popup context menu's 'Edit' option is elected
  3516.             ' *
  3517.             ' ******************************************************************************************************************************
  3518.             Private Sub mnuTransEdit_Click()
  3519.             Dim nCutsOnly As Long
  3520.             Dim nSwapInputs As Long
  3521.             Dim dblCutpoint As Double
  3522.             Dim dblStopTime As Double
  3523.             Dim dblStartTime As Double
  3524.             Dim bstrTransitionCLSID As String
  3525.             Dim objTransition As AMTimelineTrans
  3526.             On Local Error GoTo ErrLine
  3527.             
  3528.             'obtain the transition from the global timeline object
  3529.             'which is reset when the user clicks a node on the tree
  3530.             If Not gbl_objDexterObject Is Nothing Then
  3531.                Set objTransition = gbl_objDexterObject
  3532.             Else: Exit Sub
  3533.             End If
  3534.             
  3535.             'obtain existing transition information
  3536.             If Not objTransition Is Nothing Then
  3537.                With objTransition
  3538.                   'get cutpoint
  3539.                   Call .GetCutPoint2(dblCutpoint)
  3540.                   'get cutsonly
  3541.                   Call .GetCutsOnly(nCutsOnly)
  3542.                   'get swap inputs
  3543.                   Call .GetSwapInputs(nSwapInputs)
  3544.                   'get start /stoptime
  3545.                   Call gbl_objDexterObject.GetStartStop2(dblStartTime, dblStopTime)
  3546.                   'get transition clsid
  3547.                   bstrTransitionCLSID = gbl_objDexterObject.GetSubObjectGUIDB
  3548.                End With
  3549.             End If
  3550.             
  3551.             'hide the dialog
  3552.             Load frmTransitions
  3553.             frmTransitions.Visible = False
  3554.             
  3555.             'update the form with the existing information
  3556.             With frmTransitions
  3557.                .txtStartTime = CStr(dblStartTime)
  3558.                .txtStopTime = CStr(dblStopTime)
  3559.                .txtCutsOnly = CStr(nCutsOnly)
  3560.                .txtCutpoint = CStr(dblCutpoint)
  3561.                .txtSwapInputs = CStr(nSwapInputs)
  3562.                .cmbTransition = CStr(TransitionCLSIDToFriendlyName(bstrTransitionCLSID))
  3563.             End With
  3564.             
  3565.             'display the dialog
  3566.             frmTransitions.Caption = "Edit Transition"
  3567.             frmTransitions.Show vbModal, Me
  3568.             
  3569.             'wait until the user closes the dialog
  3570.             Do Until frmTransitions.Visible = False: DoEvents
  3571.             Loop
  3572.             'verify unload mode
  3573.             If frmTransitions.UnloadMode = 1 Then
  3574.                Unload frmTransitions: Set frmTransitions = Nothing: Exit Sub
  3575.             End If
  3576.             
  3577.             'query the dialog information
  3578.             With frmTransitions
  3579.                If IsNumeric(.txtStartTime.Text) Then
  3580.                   dblStartTime = CDbl(.txtStartTime.Text)
  3581.                End If
  3582.                If IsNumeric(.txtStopTime.Text) Then
  3583.                   dblStopTime = CDbl(.txtStopTime.Text)
  3584.                End If
  3585.                If IsNumeric(.txtCutpoint.Text) Then
  3586.                   dblCutpoint = CDbl(.txtCutpoint.Text)
  3587.                End If
  3588.                If IsNumeric(.txtCutsOnly.Text) Then
  3589.                   nCutsOnly = CLng(.txtCutsOnly.Text)
  3590.                End If
  3591.                If IsNumeric(.txtSwapInputs.Text) Then
  3592.                   nSwapInputs = CLng(.txtSwapInputs.Text)
  3593.                End If
  3594.                If .cmbTransition <> vbNullString Then
  3595.                  bstrTransitionCLSID = TransitionFriendlyNameToCLSID(CStr(.cmbTransition.Text))
  3596.                End If
  3597.             End With
  3598.             
  3599.             'update the transition info given the new information
  3600.             If Not gbl_objDexterObject Is Nothing Then
  3601.                'set the transition clsid
  3602.                Call gbl_objDexterObject.SetSubObjectGUIDB(bstrTransitionCLSID)
  3603.                'set the cutpoint
  3604.                Call objTransition.SetCutPoint2(dblCutpoint)
  3605.                'set the cutsonly
  3606.                Call objTransition.SetCutsOnly(nCutsOnly)
  3607.                'set the swap inputs
  3608.                Call objTransition.SetSwapInputs(nSwapInputs)
  3609.                'set the media times
  3610.                Call gbl_objDexterObject.SetStartStop2(dblStartTime, dblStopTime)
  3611.             End If
  3612.             
  3613.             'refresh the ide
  3614.             Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  3615.             
  3616.             'destroy the dialog
  3617.             Unload frmTransitions: Set frmTransitions = Nothing
  3618.             Exit Sub
  3619.             
  3620. ErrLine:
  3621.             Err.Clear
  3622.             Exit Sub
  3623.             End Sub
  3624. ' **************************************************************************************************************************************
  3625. ' * PRIVATE INTERFACE- STATUSBAR EVENT HANDLERS
  3626.             ' ******************************************************************************************************************************
  3627.             ' * procedure name: sbStatus_MouseMove
  3628.             ' * procedure description:  Occurs when the user moves the mouse.
  3629.             ' *
  3630.             ' ******************************************************************************************************************************
  3631.             Private Sub sbStatus_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3632.             On Local Error GoTo ErrLine
  3633.             If Me.MousePointer = 9 Then Me.MousePointer = vbDefault
  3634.             If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  3635.             Exit Sub
  3636.             
  3637. ErrLine:
  3638.             Err.Clear
  3639.             Exit Sub
  3640.             End Sub
  3641.             
  3642.             
  3643.             ' ******************************************************************************************************************************
  3644.             ' * procedure name: sbStatus_OLEDragDrop
  3645.             ' * procedure description:  Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  3646.             ' *
  3647.             ' ******************************************************************************************************************************
  3648.             Private Sub sbStatus_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  3649.             On Local Error GoTo ErrLine
  3650.             
  3651.             'pass to the application drag drop handler
  3652.             Call AppOLEDragDrop(Data, Effect, Button, Shift, X, Y)
  3653.             Exit Sub
  3654.             
  3655. ErrLine:
  3656.             Err.Clear
  3657.             Exit Sub
  3658.             End Sub
  3659.             
  3660.             
  3661.             ' ******************************************************************************************************************************
  3662.             ' * procedure name: sbStatus_OLEDragOver
  3663.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  3664.             ' *
  3665.             ' ******************************************************************************************************************************
  3666.             Private Sub sbStatus_OLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  3667.             On Local Error GoTo ErrLine
  3668.             
  3669.             'pass to the application drag over handler
  3670.             Call AppOLEDragOver(Data, Effect, Button, Shift, X, Y, State)
  3671.             Exit Sub
  3672.             
  3673. ErrLine:
  3674.             Err.Clear
  3675.             Exit Sub
  3676.             End Sub
  3677. ' **************************************************************************************************************************************
  3678. ' * PRIVATE INTERFACE- LISTVIEW EVENT HANDLERS
  3679.             ' ******************************************************************************************************************************
  3680.             ' * procedure name: lstViewInfo_AfterLabelEdit
  3681.             ' * procedure description:   Occurs after a user edits the label of the currently selected Node or ListItem object.
  3682.             ' *
  3683.             ' ******************************************************************************************************************************
  3684.             Private Sub lstViewInfo_AfterLabelEdit(Cancel As Integer, NewString As String)
  3685.             On Local Error GoTo ErrLine
  3686.             Cancel = 1
  3687.             Exit Sub
  3688.             
  3689. ErrLine:
  3690.             Err.Clear
  3691.             Exit Sub
  3692.             End Sub
  3693.             
  3694.             
  3695.             ' ******************************************************************************************************************************
  3696.             ' * procedure name: lstViewInfo_BeforeLabelEdit
  3697.             ' * procedure description:  Occurs when a user attempts to edit the label of the currently selected ListItem or Node object.
  3698.             ' *
  3699.             ' ******************************************************************************************************************************
  3700.             Private Sub lstViewInfo_BeforeLabelEdit(Cancel As Integer)
  3701.             On Local Error GoTo ErrLine
  3702.             Cancel = 1
  3703.             Exit Sub
  3704.             
  3705. ErrLine:
  3706.             Err.Clear
  3707.             Exit Sub
  3708.             End Sub
  3709.             
  3710.             
  3711.             ' ******************************************************************************************************************************
  3712.             ' * procedure name: lstViewInfo_Click
  3713.             ' * procedure description:  Occurs when the user presses and then releases a mouse button over an object.
  3714.             ' *
  3715.             ' ******************************************************************************************************************************
  3716.             Private Sub lstViewInfo_Click()
  3717.             On Local Error GoTo ErrLine
  3718.             lstViewInfo.SetFocus
  3719.             Exit Sub
  3720.             
  3721. ErrLine:
  3722.             Err.Clear
  3723.             Exit Sub
  3724.             End Sub
  3725.             
  3726.             
  3727.             ' ******************************************************************************************************************************
  3728.             ' * procedure name: lstViewInfo_ColumnClick
  3729.             ' * procedure description:  Occurs when a ColumnHeader object in a ListView control is clicked.
  3730.             ' *
  3731.             ' ******************************************************************************************************************************
  3732.             Private Sub lstViewInfo_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
  3733.             On Local Error GoTo ErrLine
  3734.             
  3735.             'sort listview contents by given column
  3736.             If ColumnHeader.Key = "Parameter" Then
  3737.                If lstViewInfo.Sorted = False Then lstViewInfo.Sorted = True
  3738.                If lstViewInfo.SortKey <> 0 Then lstViewInfo.SortKey = 0
  3739.                If lstViewInfo.SortOrder <> lvwAscending Then lstViewInfo.SortOrder = lvwAscending
  3740.             ElseIf ColumnHeader.Key = "Value" Then
  3741.                If lstViewInfo.Sorted = False Then lstViewInfo.Sorted = True
  3742.                If lstViewInfo.SortKey <> 1 Then lstViewInfo.SortKey = 1
  3743.                If lstViewInfo.SortOrder <> lvwAscending Then lstViewInfo.SortOrder = lvwAscending
  3744.             End If
  3745.             Exit Sub
  3746.             
  3747. ErrLine:
  3748.             Err.Clear
  3749.             Exit Sub
  3750.             End Sub
  3751.             
  3752.             
  3753.             ' ******************************************************************************************************************************
  3754.             ' * procedure name: lstViewInfo_GotFocus
  3755.             ' * procedure description:  Occurs when an object receives the focus.
  3756.             ' *
  3757.             ' ******************************************************************************************************************************
  3758.             Private Sub lstViewInfo_GotFocus()
  3759.             On Local Error GoTo ErrLine
  3760.             'reset the tooltip text
  3761.             lstViewInfo.ToolTipText = vbNullString
  3762.             Exit Sub
  3763.             
  3764. ErrLine:
  3765.             Err.Clear
  3766.             Exit Sub
  3767.             End Sub
  3768.             
  3769.             
  3770.             ' ******************************************************************************************************************************
  3771.             ' * procedure name: lstViewInfo_ItemClick
  3772.             ' * procedure description:  Occurs when a ListItem object is clicked or selected
  3773.             ' *
  3774.             ' ******************************************************************************************************************************
  3775.             Private Sub lstViewInfo_ItemClick(ByVal Item As MSComctlLib.ListItem)
  3776.             On Local Error GoTo ErrLine
  3777.             
  3778.             'display a tooltip for the item
  3779.             If Not Item Is Nothing Then
  3780.                If Item.ListSubItems.Count > 0 Then
  3781.                   If Trim(Item.SubItems(1)) <> vbNullString Then
  3782.                   lstViewInfo.ToolTipText = CStr(Trim(Item.Text) & " = " & Chr(34) & Trim(Item.SubItems(1)) & Chr(34))
  3783.                   Else: lstViewInfo.ToolTipText = vbNullString
  3784.                   End If
  3785.                Else: lstViewInfo.ToolTipText = CStr(Item.Text)
  3786.                End If
  3787.             End If
  3788.             Exit Sub
  3789.             
  3790. ErrLine:
  3791.             Err.Clear
  3792.             Exit Sub
  3793.             End Sub
  3794.             
  3795.             
  3796.             ' ******************************************************************************************************************************
  3797.             ' * procedure name: lstViewInfo_LostFocus
  3798.             ' * procedure description:  Occurs when an object loses the focus.
  3799.             ' *
  3800.             ' ******************************************************************************************************************************
  3801.             Private Sub lstViewInfo_LostFocus()
  3802.             On Local Error GoTo ErrLine
  3803.             'reset the tooltip text
  3804.             lstViewInfo.ToolTipText = vbNullString
  3805.             Exit Sub
  3806.             
  3807. ErrLine:
  3808.             Err.Clear
  3809.             Exit Sub
  3810.             End Sub
  3811.             
  3812.             
  3813.             ' ******************************************************************************************************************************
  3814.             ' * procedure name: lstViewInfo_MouseDown
  3815.             ' * procedure description:  Occurs when the user presses the mouse button while an object has the focus.
  3816.             ' *
  3817.             ' ******************************************************************************************************************************
  3818.             Private Sub lstViewInfo_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3819.             On Local Error GoTo ErrLine
  3820.             'reset the tooltip text
  3821.             lstViewInfo.ToolTipText = vbNullString
  3822.             Exit Sub
  3823.             
  3824. ErrLine:
  3825.             Err.Clear
  3826.             Exit Sub
  3827.             End Sub
  3828.             
  3829.             
  3830.             ' ******************************************************************************************************************************
  3831.             ' * procedure name: lstViewInfo_MouseMove
  3832.             ' * procedure description:  Occurs when the user moves the mouse.
  3833.             ' *
  3834.             ' ******************************************************************************************************************************
  3835.             Private Sub lstViewInfo_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3836.             On Local Error GoTo ErrLine
  3837.             
  3838.             If Me.MousePointer = 9 Then Me.MousePointer = vbDefault
  3839.             If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  3840.             
  3841.             'disable tooltip if a hittest on the current position fails
  3842.             If lstViewInfo.HitTest(X, Y) Is Nothing Then lstViewInfo.ToolTipText = vbNullString
  3843.             Exit Sub
  3844.             
  3845. ErrLine:
  3846.             Err.Clear
  3847.             Exit Sub
  3848.             End Sub
  3849.             
  3850.             
  3851.             ' ******************************************************************************************************************************
  3852.             ' * procedure name: lstViewInfo_OLEDragDrop
  3853.             ' * procedure description:  Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  3854.             ' *
  3855.             ' ******************************************************************************************************************************
  3856.             Private Sub lstViewInfo_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  3857.             On Local Error GoTo ErrLine
  3858.             
  3859.             'pass to the application drag drop handler
  3860.             Call AppOLEDragDrop(Data, Effect, Button, Shift, X, Y)
  3861.             Exit Sub
  3862.             
  3863. ErrLine:
  3864.             Err.Clear
  3865.             Exit Sub
  3866.             End Sub
  3867.             
  3868.             
  3869.             ' ******************************************************************************************************************************
  3870.             ' * procedure name: lstViewInfo_OLEDragOver
  3871.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  3872.             ' *
  3873.             ' ******************************************************************************************************************************
  3874.             Private Sub lstViewInfo_OLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  3875.             On Local Error GoTo ErrLine
  3876.             
  3877.             'pass to the application drag over handler
  3878.             Call AppOLEDragOver(Data, Effect, Button, Shift, X, Y, State)
  3879.             Exit Sub
  3880.             
  3881. ErrLine:
  3882.             Err.Clear
  3883.             Exit Sub
  3884.             End Sub
  3885. ' **************************************************************************************************************************************
  3886. ' * PRIVATE INTERFACE- TREEVIEW EVENT HANDLERS
  3887.             ' ******************************************************************************************************************************
  3888.             ' * procedure name: tvwSimpleTree_AfterLabelEdit
  3889.             ' * procedure description:  Occurs after a user edits the label of the currently selected Node or ListItem object.
  3890.             ' *
  3891.             ' ******************************************************************************************************************************
  3892.             Private Sub tvwSimpleTree_AfterLabelEdit(Cancel As Integer, NewString As String)
  3893.             On Local Error GoTo ErrLine
  3894.             Cancel = 1
  3895.             Exit Sub
  3896.             
  3897. ErrLine:
  3898.             Err.Clear
  3899.             Exit Sub
  3900.             End Sub
  3901.             
  3902.             
  3903.             ' ******************************************************************************************************************************
  3904.             ' * procedure name: tvwSimpleTree_BeforeLabelEdit
  3905.             ' * procedure description:  Occurs when a user attempts to edit the label of the currently selected ListItem or Node object.
  3906.             ' *
  3907.             ' ******************************************************************************************************************************
  3908.             Private Sub tvwSimpleTree_BeforeLabelEdit(Cancel As Integer)
  3909.             On Local Error GoTo ErrLine
  3910.             Cancel = 1
  3911.             Exit Sub
  3912.             
  3913. ErrLine:
  3914.             Err.Clear
  3915.             Exit Sub
  3916.             End Sub
  3917.             
  3918.             
  3919.             ' ******************************************************************************************************************************
  3920.             ' * procedure name: tvwSimpleTree_Click
  3921.             ' * procedure description:  Occurs when the user presses and then releases a mouse button over an object.
  3922.             ' *
  3923.             ' ******************************************************************************************************************************
  3924.             Private Sub tvwSimpleTree_Click()
  3925.             On Local Error GoTo ErrLine
  3926.             
  3927.             'set the root node selected if nothing is selected
  3928.             If tvwSimpleTree.SelectedItem Is Nothing Then
  3929.                If tvwSimpleTree.Nodes.Count > 0 Then
  3930.                   If Not tvwSimpleTree.Nodes(1).Root Is Nothing Then
  3931.                      Set tvwSimpleTree.SelectedItem = tvwSimpleTree.Nodes(1).Root
  3932.                   End If
  3933.                End If
  3934.             End If
  3935.             Exit Sub
  3936.             
  3937. ErrLine:
  3938.             Err.Clear
  3939.             Exit Sub
  3940.             End Sub
  3941.             
  3942.             
  3943.             ' ******************************************************************************************************************************
  3944.             ' * procedure name: tvwSimpleTree_Collapse
  3945.             ' * procedure description:  Generated when any Node object in a TreeView control is collapsed.
  3946.             ' *
  3947.             ' ******************************************************************************************************************************
  3948.             Private Sub tvwSimpleTree_Collapse(ByVal node As MSComctlLib.node)
  3949.             On Local Error GoTo ErrLine
  3950.             
  3951.             'ensure selected
  3952.             If Not node Is Nothing Then Set tvwSimpleTree.SelectedItem = node
  3953.             Exit Sub
  3954.             
  3955. ErrLine:
  3956.             Err.Clear
  3957.             Exit Sub
  3958.             End Sub
  3959.             
  3960.             
  3961.             ' ******************************************************************************************************************************
  3962.             ' * procedure name: tvwSimpleTree_DblClick
  3963.             ' * procedure description:  Occurs when you press and release a mouse button and then press and release it again over an object.
  3964.             ' *
  3965.             ' ******************************************************************************************************************************
  3966.             Private Sub tvwSimpleTree_DblClick()
  3967.             On Local Error GoTo ErrLine
  3968.             
  3969.             'set focus
  3970.             tvwSimpleTree.SetFocus
  3971.             Exit Sub
  3972.             
  3973. ErrLine:
  3974.             Err.Clear
  3975.             Exit Sub
  3976.             End Sub
  3977.             
  3978.             
  3979.             ' ******************************************************************************************************************************
  3980.             ' * procedure name: tvwSimpleTree_Expand
  3981.             ' * procedure description:  Occurs when a Node object in a TreeView control is expanded; that is, when its child nodes become visible.
  3982.             ' *
  3983.             ' ******************************************************************************************************************************
  3984.             Private Sub tvwSimpleTree_Expand(ByVal node As MSComctlLib.node)
  3985.             On Local Error GoTo ErrLine
  3986.             
  3987.             'ensure selected
  3988.             If Not node Is Nothing Then Set tvwSimpleTree.SelectedItem = node
  3989.             Exit Sub
  3990.             
  3991. ErrLine:
  3992.             Err.Clear
  3993.             Exit Sub
  3994.             End Sub
  3995.             
  3996.             
  3997.             ' ******************************************************************************************************************************
  3998.             ' * procedure name: tvwSimpleTree_GotFocus
  3999.             ' * procedure description:  Occurs when an object receives the focus.
  4000.             ' *
  4001.             ' ******************************************************************************************************************************
  4002.             Private Sub tvwSimpleTree_GotFocus()
  4003.             On Local Error GoTo ErrLine
  4004.             'reset the tooltip text
  4005.             tvwSimpleTree.ToolTipText = vbNullString
  4006.             Exit Sub
  4007.             
  4008. ErrLine:
  4009.             Err.Clear
  4010.             Exit Sub
  4011.             End Sub
  4012.             
  4013.             
  4014.             ' ******************************************************************************************************************************
  4015.             ' * procedure name: tvwSimpleTree_KeyDown
  4016.             ' * procedure description:  Occurs when the user presses a key while an object has the focus.
  4017.             ' *
  4018.             ' ******************************************************************************************************************************
  4019.             Private Sub tvwSimpleTree_KeyDown(KeyCode As Integer, Shift As Integer)
  4020.             Dim objNode As node
  4021.             On Local Error GoTo ErrLine
  4022.             
  4023.             'obtain the selected node on the treeview
  4024.             If Not tvwSimpleTree.SelectedItem Is Nothing Then
  4025.                Set objNode = tvwSimpleTree.SelectedItem
  4026.             Else: Exit Sub
  4027.             End If
  4028.             
  4029.             'cross reference the object's guid with the module-level collection
  4030.             'and attempt to obtain a match based on the unique identifier of the node
  4031.             If Not gbl_colNormalEnum(objNode.Key) Is Nothing Then
  4032.                Select Case objNode.Tag
  4033.                   Case "AMTimelineGroup"
  4034.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4035.                   Case "AMTimelineComp"
  4036.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4037.                   Case "AMTimelineTrack"
  4038.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4039.                   Case "AMTimelineSrc"
  4040.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4041.                   Case "AMTimelineTrans"
  4042.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4043.                   Case "AMTimelineEffect"
  4044.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4045.               End Select
  4046.             Else: Exit Sub
  4047.             End If
  4048.             
  4049.             
  4050.             If KeyCode = vbKeyDelete Then
  4051.                'delete the item from the treeview
  4052.                If Not gbl_colNormalEnum(objNode.Key) Is Nothing Then
  4053.                
  4054.                   Select Case objNode.Tag
  4055.                   
  4056.                      Case "AMTimeline"
  4057.                         'dereference & clean-up the existing timeline
  4058.                         If Not gbl_objTimeline Is Nothing Then Call ClearTimeline(gbl_objTimeline)
  4059.                         'dereference & clean-up application-level data
  4060.                         If Not gbl_objTimeline Is Nothing Then Set gbl_objTimeline = Nothing
  4061.                         If Not gbl_objFilterGraph Is Nothing Then Set gbl_objFilterGraph = Nothing
  4062.                         'reinitalize application-level data
  4063.                         Set gbl_objTimeline = New AMTimeline
  4064.                         Set gbl_objFilterGraph = New FilgraphManager
  4065.                         'reinitalize the treeview/listview
  4066.                         Call lstViewInfo.ListItems.Clear
  4067.                         Call tvwSimpleTree.Nodes.Clear
  4068.                         
  4069.                      Case "AMTimelineGroup"
  4070.                          'dupe the functionality of a manual group delete
  4071.                          Call mnuGroupDelete_Click
  4072.                          
  4073.                      Case "AMTimelineComp"
  4074.                          'dupe the functionality of a manual composition delete
  4075.                          Call mnuCompDelete_Click
  4076.                          
  4077.                      Case "AMTimelineTrack"
  4078.                          'dupe the functionality of a manual track delete
  4079.                          Call mnuTrackDelete_Click
  4080.                          
  4081.                      Case "AMTimelineSrc"
  4082.                          'dupe the functionality of a manual clip source delete
  4083.                          Call mnuClipDelete_Click
  4084.                          
  4085.                      Case "AMTimelineTrans"
  4086.                          'dupe the functionality of a manual transition delete
  4087.                          Call mnuTransDelete_Click
  4088.                          
  4089.                      Case "AMTimelineEffect"
  4090.                          'dupe the functionality of a manual effect delete
  4091.                          Call mnuEffectDelete_Click
  4092.                  End Select
  4093.                Else: Exit Sub
  4094.                End If
  4095.             End If
  4096.             Exit Sub
  4097.             
  4098. ErrLine:
  4099.             Err.Clear
  4100.             Exit Sub
  4101.             End Sub
  4102.             
  4103.             
  4104.             ' ******************************************************************************************************************************
  4105.             ' * procedure name: tvwSimpleTree_LostFocus
  4106.             ' * procedure description:  Occurs when an object loses the focus.
  4107.             ' *
  4108.             ' ******************************************************************************************************************************
  4109.             Private Sub tvwSimpleTree_LostFocus()
  4110.             On Local Error GoTo ErrLine
  4111.             'reset the tooltip text
  4112.             tvwSimpleTree.ToolTipText = vbNullString
  4113.             Exit Sub
  4114.             
  4115. ErrLine:
  4116.             Err.Clear
  4117.             Exit Sub
  4118.             End Sub
  4119.             
  4120.             
  4121.             ' ******************************************************************************************************************************
  4122.             ' * procedure name: tvwSimpleTree_MouseDown
  4123.             ' * procedure description:   Occurs when the user presses the mouse button while an object has the focus.
  4124.             ' *
  4125.             ' ******************************************************************************************************************************
  4126.             Private Sub tvwSimpleTree_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  4127.             Dim objNode As node
  4128.             On Local Error GoTo ErrLine
  4129.             
  4130.             'get the current node
  4131.             If Not tvwSimpleTree.HitTest(X, Y) Is Nothing Then
  4132.                Set objNode = tvwSimpleTree.HitTest(X, Y)
  4133.                Set tvwSimpleTree.SelectedItem = objNode
  4134.             ElseIf Not tvwSimpleTree.SelectedItem Is Nothing Then
  4135.                Set objNode = tvwSimpleTree.SelectedItem
  4136.             Else: Exit Sub
  4137.             End If
  4138.             
  4139.             'cross reference the object's guid with the module-level collection
  4140.             'and attempt to obtain a match based on the unique identifier of the node
  4141.             If Not gbl_colNormalEnum(objNode.Key) Is Nothing Then
  4142.                Select Case objNode.Tag
  4143.                   Case "AMTimelineGroup"
  4144.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4145.                   Case "AMTimelineComp"
  4146.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4147.                   Case "AMTimelineTrack"
  4148.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4149.                   Case "AMTimelineSrc"
  4150.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4151.                   Case "AMTimelineTrans"
  4152.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4153.                   Case "AMTimelineEffect"
  4154.                       Set gbl_objDexterObject = gbl_colNormalEnum(objNode.Key)
  4155.               End Select
  4156.             Else: Exit Sub
  4157.             End If
  4158.             
  4159.             'display a tooltip for the item
  4160.             If Not objNode Is Nothing Then
  4161.                If Trim(objNode.Text) <> vbNullString Then
  4162.                   tvwSimpleTree.ToolTipText = objNode.Text
  4163.                End If
  4164.             End If
  4165.             
  4166.             'update the listview with the item's information
  4167.             If Not gbl_colNormalEnum(objNode.Key) Is Nothing Then
  4168.                Select Case objNode.Tag
  4169.                   Case "AMTimeline"
  4170.                      Call RefreshListView(lstViewInfo, "AMTimeline", objNode.Key)
  4171.                      Call ViewTimelineInfo(lstViewInfo, gbl_objTimeline)
  4172.                      
  4173.                   Case "AMTimelineGroup"
  4174.                       Call RefreshListView(lstViewInfo, "AMTimelineGroup", objNode.Key)
  4175.                       Call ViewGroupInfo(lstViewInfo, gbl_objDexterObject)
  4176.                       
  4177.                   Case "AMTimelineComp"
  4178.                       Call RefreshListView(lstViewInfo, "AMTimelineComp", objNode.Key)
  4179.                       Call ViewCompositeInfo(lstViewInfo, gbl_objDexterObject)
  4180.                       
  4181.                   Case "AMTimelineTrack"
  4182.                       Call RefreshListView(lstViewInfo, "AMTimelineTrack", objNode.Key)
  4183.                       Call ViewTrackInfo(lstViewInfo, gbl_objDexterObject)
  4184.                       
  4185.                   Case "AMTimelineSrc"
  4186.                       Call RefreshListView(lstViewInfo, "AMTimelineSrc", objNode.Key)
  4187.                       Call ViewSourceInfo(lstViewInfo, gbl_objDexterObject)
  4188.                       
  4189.                   Case "AMTimelineTrans"
  4190.                       Call RefreshListView(lstViewInfo, "AMTimelineTrans", objNode.Key)
  4191.                       Call ViewTransitionInfo(lstViewInfo, gbl_objDexterObject)
  4192.                       
  4193.                   Case "AMTimelineEffect"
  4194.                       Call RefreshListView(lstViewInfo, "AMTimelineEffect", objNode.Key)
  4195.                       Call ViewEffectInfo(lstViewInfo, gbl_objDexterObject)
  4196.                       
  4197.               End Select
  4198.             Else: Exit Sub
  4199.             End If
  4200.             
  4201.             'derive the type of object given the tag of the node
  4202.             'and popup the menu for the given object type..
  4203.             If Button = 2 Then
  4204.                Select Case objNode.Tag
  4205.                    Case "AMTimeline"
  4206.                        PopupMenu mnuTimeline
  4207.                    Case "AMTimelineGroup"
  4208.                        PopupMenu mnuGroup
  4209.                    Case "AMTimelineComp"
  4210.                        PopupMenu mnuComp
  4211.                    Case "AMTimelineTrack"
  4212.                        PopupMenu mnuTrack
  4213.                    Case "AMTimelineSrc"
  4214.                        PopupMenu mnuClip
  4215.                    Case "AMTimelineTrans"
  4216.                        PopupMenu mnuTrans
  4217.                    Case "AMTimelineEffect"
  4218.                        PopupMenu mnuEffect
  4219.                End Select
  4220.             End If
  4221.             
  4222.             'clean-up & dereference
  4223.             If Not objNode Is Nothing Then Set objNode = Nothing
  4224.             Exit Sub
  4225.             
  4226. ErrLine:
  4227.             Err.Clear
  4228.             Exit Sub
  4229.             End Sub
  4230.             
  4231.             
  4232.             ' ******************************************************************************************************************************
  4233.             ' * procedure name: tvwSimpleTree_MouseMove
  4234.             ' * procedure description:  Occurs when the user moves the mouse.
  4235.             ' *
  4236.             ' ******************************************************************************************************************************
  4237.             Private Sub tvwSimpleTree_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  4238.             On Local Error GoTo ErrLine
  4239.             If Me.MousePointer = 9 Then Me.MousePointer = vbDefault
  4240.             If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  4241.             
  4242.             'disable tooltip if a hittest on the current position fails
  4243.             If tvwSimpleTree.HitTest(X, Y) Is Nothing Then tvwSimpleTree.ToolTipText = vbNullString
  4244.             Exit Sub
  4245.             
  4246. ErrLine:
  4247.             Err.Clear
  4248.             Exit Sub
  4249.             End Sub
  4250.             
  4251.             
  4252.             ' ******************************************************************************************************************************
  4253.             ' * procedure name: tvwSimpleTree_NodeClick
  4254.             ' * procedure description:  Occurs when a Node object is clicked.
  4255.             ' *
  4256.             ' ******************************************************************************************************************************
  4257.             Private Sub tvwSimpleTree_NodeClick(ByVal node As MSComctlLib.node)
  4258.             On Local Error GoTo ErrLine
  4259.             
  4260.             'display a tooltip for the item
  4261.             If Not node Is Nothing Then
  4262.                If Trim(node.Text) <> vbNullString Then
  4263.                   tvwSimpleTree.ToolTipText = node.Text
  4264.                End If
  4265.             End If
  4266.             
  4267.             'update the listview with the item's information
  4268.             If Not gbl_colNormalEnum(node.Key) Is Nothing Then
  4269.                Select Case node.Tag
  4270.                   Case "AMTimeline"
  4271.                      Call RefreshListView(lstViewInfo, "AMTimeline", node.Key)
  4272.                      Call ViewTimelineInfo(lstViewInfo, gbl_objTimeline)
  4273.                      
  4274.                   Case "AMTimelineGroup"
  4275.                       Call RefreshListView(lstViewInfo, "AMTimelineGroup", node.Key)
  4276.                       Call ViewGroupInfo(lstViewInfo, gbl_objDexterObject)
  4277.                       
  4278.                   Case "AMTimelineComp"
  4279.                       Call RefreshListView(lstViewInfo, "AMTimelineComp", node.Key)
  4280.                       Call ViewCompositeInfo(lstViewInfo, gbl_objDexterObject)
  4281.                       
  4282.                   Case "AMTimelineTrack"
  4283.                       Call RefreshListView(lstViewInfo, "AMTimelineTrack", node.Key)
  4284.                       Call ViewTrackInfo(lstViewInfo, gbl_objDexterObject)
  4285.                       
  4286.                   Case "AMTimelineSrc"
  4287.                       Call RefreshListView(lstViewInfo, "AMTimelineSrc", node.Key)
  4288.                       Call ViewSourceInfo(lstViewInfo, gbl_objDexterObject)
  4289.                       
  4290.                   Case "AMTimelineTrans"
  4291.                       Call RefreshListView(lstViewInfo, "AMTimelineTrans", node.Key)
  4292.                       Call ViewTransitionInfo(lstViewInfo, gbl_objDexterObject)
  4293.                       
  4294.                   Case "AMTimelineEffect"
  4295.                       Call RefreshListView(lstViewInfo, "AMTimelineEffect", node.Key)
  4296.                       Call ViewEffectInfo(lstViewInfo, gbl_objDexterObject)
  4297.                       
  4298.               End Select
  4299.             Else: Exit Sub
  4300.             End If
  4301.             Exit Sub
  4302.             
  4303. ErrLine:
  4304.             Err.Clear
  4305.             Exit Sub
  4306.             End Sub
  4307.             
  4308.             
  4309.             ' ******************************************************************************************************************************
  4310.             ' * procedure name: tvwSimpleTree_OLEDragDrop
  4311.             ' * procedure description:  Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  4312.             ' *
  4313.             ' ******************************************************************************************************************************
  4314.             Private Sub tvwSimpleTree_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  4315.             On Local Error GoTo ErrLine
  4316.             
  4317.             'pass to the application drag drop handler
  4318.             Call AppOLEDragDrop(Data, Effect, Button, Shift, X, Y)
  4319.             Exit Sub
  4320.             
  4321. ErrLine:
  4322.             Err.Clear
  4323.             Exit Sub
  4324.             End Sub
  4325.             
  4326.             
  4327.             ' ******************************************************************************************************************************
  4328.             ' * procedure name: tvwSimpleTree_OLEDragOver
  4329.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  4330.             ' *
  4331.             ' ******************************************************************************************************************************
  4332.             Private Sub tvwSimpleTree_OLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  4333.             On Local Error GoTo ErrLine
  4334.             
  4335.             'pass to the application drag over handler
  4336.             Call AppOLEDragOver(Data, Effect, Button, Shift, X, Y, State)
  4337.             Exit Sub
  4338.             
  4339. ErrLine:
  4340.             Err.Clear
  4341.             Exit Sub
  4342.             End Sub
  4343. ' **************************************************************************************************************************************
  4344. ' * PRIVATE INTERFACE- TOOLBAR EVENT HANDLERS
  4345.             ' ******************************************************************************************************************************
  4346.             ' * procedure name: tbMain_ButtonClick
  4347.             ' * procedure description:  Occurs when the user clicks on a Button object in a Toolbar control.
  4348.             ' *
  4349.             ' ******************************************************************************************************************************
  4350.             Private Sub tbMain_ButtonClick(ByVal Button As MSComctlLib.Button)
  4351.             On Local Error GoTo ErrLine
  4352.             
  4353.                  Select Case LCase(Button.Key)
  4354.                      Case "new"
  4355.                               'the functionality is identical to the file 'new' menu option
  4356.                               Call mnuFileNewTimeline_Click
  4357.                      Case "open"
  4358.                               'the functionality is identical to the file 'open' menu option
  4359.                               Call mnuFileOpen_Click
  4360.                      Case "save"
  4361.                               'the functionality is identical to the file 'saveas' menu option
  4362.                               Call mnuFileSaveAs_Click
  4363.                      Case "rewind"
  4364.                               'seek to the beggining of the media
  4365.                               Select Case gbl_objQuartzVB.State
  4366.                                    Case QTZStatusConstants.QTZStatusPlaying
  4367.                                             Call gbl_objQuartzVB.StopGraph
  4368.                                             gbl_objQuartzVB.Position = 0
  4369.                                             
  4370.                                    Case QTZStatusConstants.QTZStatusPaused
  4371.                                             gbl_objQuartzVB.Position = 0
  4372.                                             
  4373.                                    Case QTZStatusConstants.QTZStatusStopped
  4374.                                             gbl_objQuartzVB.Position = 0
  4375.                                End Select
  4376.                               
  4377.                               
  4378.                      Case "seekbackward"
  4379.                               'scrub backward by one second
  4380.                               Select Case gbl_objQuartzVB.State
  4381.                                    Case QTZStatusConstants.QTZStatusPlaying
  4382.                                             Call gbl_objQuartzVB.StopGraph
  4383.                                             gbl_objQuartzVB.Position = gbl_objQuartzVB.Position - 1
  4384.                                             
  4385.                                    Case QTZStatusConstants.QTZStatusPaused
  4386.                                             gbl_objQuartzVB.Position = gbl_objQuartzVB.Position - 1
  4387.                                             
  4388.                                    Case QTZStatusConstants.QTZStatusStopped
  4389.                                             gbl_objQuartzVB.Position = gbl_objQuartzVB.Position - 1
  4390.                                End Select
  4391.                               
  4392.                               
  4393.                      Case "play"
  4394.                                
  4395.                                'update the button(s)
  4396.                                With tbMain.Buttons
  4397.                                   .Item("New").Enabled = False
  4398.                                   .Item("Open").Enabled = False
  4399.                                   .Item("Save").Enabled = False
  4400.                                   .Item("Play").Enabled = True
  4401.                                   .Item("Pause").Enabled = True
  4402.                                   .Item("Stop").Enabled = True
  4403.                                   .Item("Rewind").Enabled = False
  4404.                                   .Item("FastForward").Enabled = False
  4405.                                   .Item("SeekForward").Enabled = False
  4406.                                   .Item("SeekBackward").Enabled = False
  4407.                                End With
  4408.                                
  4409.                                'update the state on the popup context menu
  4410.                                mnuTimeLinePlay.Enabled = False
  4411.                                mnuTimeLineStop.Enabled = True
  4412.                                mnuTimeLinePause.Enabled = True
  4413.                                mnuTimeLineRenderTimeLine.Enabled = False
  4414.                                mnuTimeLineClearRenderEngine.Enabled = False
  4415.                                
  4416.                                'play the timeline for the client
  4417.                                Select Case gbl_objQuartzVB.State
  4418.                                    Case QTZStatusConstants.QTZStatusPlaying
  4419.                                             Call gbl_objQuartzVB.StopGraph
  4420.                                             gbl_objQuartzVB.Position = 0
  4421.                                             Call gbl_objQuartzVB.RunGraph
  4422.                                             
  4423.                                    Case QTZStatusConstants.QTZStatusPaused
  4424.                                             Call gbl_objQuartzVB.RunGraph
  4425.                                             
  4426.                                    Case QTZStatusConstants.QTZStatusStopped
  4427.                                             'to prevent rendering out the timeline again (consequently resetting the media's
  4428.                                             'position to zero before restarting audio/video playback) comment the line below..
  4429.                                             Set gbl_objQuartzVB.FilterGraph = RenderTimeline(gbl_objTimeline)
  4430.                                             Call gbl_objQuartzVB.RunGraph
  4431.                                End Select
  4432.                                
  4433.                      Case "pause"
  4434.                                'update the button(s)
  4435.                                With tbMain.Buttons
  4436.                                   .Item("New").Enabled = True
  4437.                                   .Item("Open").Enabled = True
  4438.                                   .Item("Save").Enabled = True
  4439.                                   .Item("Play").Enabled = True
  4440.                                   .Item("Pause").Enabled = True
  4441.                                   .Item("Stop").Enabled = True
  4442.                                   .Item("Rewind").Enabled = True
  4443.                                   .Item("FastForward").Enabled = True
  4444.                                   .Item("SeekForward").Enabled = True
  4445.                                   .Item("SeekBackward").Enabled = True
  4446.                                End With
  4447.                                
  4448.                                'update the state on the popup context menu
  4449.                                mnuTimeLinePlay.Enabled = True
  4450.                                mnuTimeLineStop.Enabled = True
  4451.                                mnuTimeLinePause.Enabled = False
  4452.                                mnuTimeLineRenderTimeLine.Enabled = False
  4453.                                mnuTimeLineClearRenderEngine.Enabled = False
  4454.                                
  4455.                                'pause the timeline
  4456.                               Select Case gbl_objQuartzVB.State
  4457.                                    Case QTZStatusConstants.QTZStatusPlaying
  4458.                                             Call gbl_objQuartzVB.PauseGraph
  4459.                                             
  4460.                                    Case QTZStatusConstants.QTZStatusPaused
  4461.                                             Call gbl_objQuartzVB.PauseGraph
  4462.                                             
  4463.                                    Case QTZStatusConstants.QTZStatusStopped
  4464.                                             Call gbl_objQuartzVB.PauseGraph
  4465.                                End Select
  4466.                               
  4467.                               
  4468.                                
  4469.                                
  4470.                      Case "stop"
  4471.                               'update the button(s)
  4472.                                With tbMain.Buttons
  4473.                                   .Item("New").Enabled = True
  4474.                                   .Item("Open").Enabled = True
  4475.                                   .Item("Save").Enabled = True
  4476.                                   .Item("Play").Enabled = True
  4477.                                   .Item("Pause").Enabled = False
  4478.                                   .Item("Stop").Enabled = True
  4479.                                   .Item("Rewind").Enabled = False
  4480.                                   .Item("FastForward").Enabled = False
  4481.                                   .Item("SeekForward").Enabled = False
  4482.                                   .Item("SeekBackward").Enabled = False
  4483.                                End With
  4484.                                
  4485.                                'update the state on the popup context menu
  4486.                                mnuTimeLinePlay.Enabled = True
  4487.                                mnuTimeLineStop.Enabled = False
  4488.                                mnuTimeLinePause.Enabled = False
  4489.                                mnuTimeLineRenderTimeLine.Enabled = True
  4490.                                mnuTimeLineClearRenderEngine.Enabled = True
  4491.                                
  4492.                               'stop the timeline
  4493.                               Select Case gbl_objQuartzVB.State
  4494.                                    Case QTZStatusConstants.QTZStatusPlaying
  4495.                                             Call gbl_objQuartzVB.StopGraph
  4496.                                             
  4497.                                    Case QTZStatusConstants.QTZStatusPaused
  4498.                                             Call gbl_objQuartzVB.StopGraph
  4499.                                             
  4500.                                    Case QTZStatusConstants.QTZStatusStopped
  4501.                                             Call gbl_objQuartzVB.StopGraph
  4502.                                End Select
  4503.                               
  4504.                               
  4505.                      Case "seekforward"
  4506.                               'scrub forward by one second
  4507.                               Select Case gbl_objQuartzVB.State
  4508.                                    Case QTZStatusConstants.QTZStatusPlaying
  4509.                                             Call gbl_objQuartzVB.PauseGraph
  4510.                                             gbl_objQuartzVB.Position = gbl_objQuartzVB.Position + 1
  4511.                                             
  4512.                                    Case QTZStatusConstants.QTZStatusPaused
  4513.                                             Call gbl_objQuartzVB.PauseGraph
  4514.                                             gbl_objQuartzVB.Position = gbl_objQuartzVB.Position + 1
  4515.                                             
  4516.                                    Case QTZStatusConstants.QTZStatusStopped
  4517.                                             Call gbl_objQuartzVB.PauseGraph
  4518.                                             gbl_objQuartzVB.Position = gbl_objQuartzVB.Position + 1
  4519.                                End Select
  4520.                               
  4521.                               
  4522.                      Case "fastforward"
  4523.                               'seek to the end of the media
  4524.                               Select Case gbl_objQuartzVB.State
  4525.                                    Case QTZStatusConstants.QTZStatusPlaying
  4526.                                             Call gbl_objQuartzVB.PauseGraph
  4527.                                             gbl_objQuartzVB.Position = (gbl_objQuartzVB.StopTime - 0.01)
  4528.                                             
  4529.                                    Case QTZStatusConstants.QTZStatusPaused
  4530.                                             Call gbl_objQuartzVB.PauseGraph
  4531.                                             gbl_objQuartzVB.Position = (gbl_objQuartzVB.StopTime - 0.01)
  4532.                                             
  4533.                                    Case QTZStatusConstants.QTZStatusStopped
  4534.                                             Call gbl_objQuartzVB.PauseGraph
  4535.                                             gbl_objQuartzVB.Position = (gbl_objQuartzVB.StopTime - 0.01)
  4536.                                End Select
  4537.                  End Select
  4538.             Exit Sub
  4539.             
  4540. ErrLine:
  4541.             Err.Clear
  4542.             Exit Sub
  4543.             End Sub
  4544.             
  4545.             
  4546.             ' ******************************************************************************************************************************
  4547.             ' * procedure name: tbMain_MouseMove
  4548.             ' * procedure description:  Occurs when the user moves the mouse.
  4549.             ' *
  4550.             ' ******************************************************************************************************************************
  4551.             Private Sub tbMain_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  4552.             On Local Error GoTo ErrLine
  4553.             If Me.MousePointer = 9 Then Me.MousePointer = vbDefault
  4554.             If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  4555.             Exit Sub
  4556.             
  4557. ErrLine:
  4558.             Err.Clear
  4559.             Exit Sub
  4560.             End Sub
  4561.             
  4562.             
  4563.             ' ******************************************************************************************************************************
  4564.             ' * procedure name: tbMain_OLEDragDrop
  4565.             ' * procedure description:  Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  4566.             ' *
  4567.             ' ******************************************************************************************************************************
  4568.             Private Sub tbMain_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  4569.             On Local Error GoTo ErrLine
  4570.             
  4571.             'pass to the application drag drop handler
  4572.             Call AppOLEDragDrop(Data, Effect, Button, Shift, X, Y)
  4573.             Exit Sub
  4574.             
  4575. ErrLine:
  4576.             Err.Clear
  4577.             Exit Sub
  4578.             End Sub
  4579.             
  4580.             
  4581.             ' ******************************************************************************************************************************
  4582.             ' * procedure name: tbMain_OLEDragOver
  4583.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  4584.             ' *
  4585.             ' ******************************************************************************************************************************
  4586.             Private Sub tbMain_OLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  4587.             On Local Error GoTo ErrLine
  4588.             
  4589.             'pass to the application drag over handler
  4590.             Call AppOLEDragOver(Data, Effect, Button, Shift, X, Y, State)
  4591.             Exit Sub
  4592.             
  4593. ErrLine:
  4594.             Err.Clear
  4595.             Exit Sub
  4596.             End Sub
  4597.             
  4598. ' **************************************************************************************************************************************
  4599. ' * PRIVATE INTERFACE- COOLBAR EVENT HANDLERS
  4600.             ' ******************************************************************************************************************************
  4601.             ' * procedure name: ctrlCoolBar_HeightChanged
  4602.             ' * procedure description:  Occurrs when the Coolbar control's Height changes, if its Orientation is horizontal.  Occurrs when the Coolbar control's Width changes, if its Orientation is vertical.
  4603.             ' *
  4604.             ' ******************************************************************************************************************************
  4605.             Private Sub ctrlCoolBar_HeightChanged(ByVal NewHeight As Single)
  4606.             On Local Error GoTo ErrLine
  4607.             'resize the container
  4608.             Call Form_Resize
  4609.             Exit Sub
  4610.             
  4611. ErrLine:
  4612.             Err.Clear
  4613.             Exit Sub
  4614.             End Sub
  4615.             
  4616.             
  4617.             ' ******************************************************************************************************************************
  4618.             ' * procedure name: ctrlCoolBar_MouseMove
  4619.             ' * procedure description:  Occurs when the user moves the mouse.
  4620.             ' *
  4621.             ' ******************************************************************************************************************************
  4622.             Private Sub ctrlCoolBar_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  4623.             On Local Error GoTo ErrLine
  4624.             If Me.MousePointer = 9 Then Me.MousePointer = vbDefault
  4625.             If Me.BackColor = vbBlack Then Me.BackColor = &H8000000F
  4626.             Exit Sub
  4627.             
  4628. ErrLine:
  4629.             Err.Clear
  4630.             Exit Sub
  4631.             End Sub
  4632.                      
  4633.             
  4634.             ' ******************************************************************************************************************************
  4635.             ' * procedure name: ctrlCoolBar_OLEDragDrop
  4636.             ' * procedure description:  Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  4637.             ' *
  4638.             ' ******************************************************************************************************************************
  4639.             Private Sub ctrlCoolBar_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  4640.             On Local Error GoTo ErrLine
  4641.             
  4642.             'pass to the application drag drop handler
  4643.             Call AppOLEDragDrop(Data, Effect, Button, Shift, X, Y)
  4644.             Exit Sub
  4645.             
  4646. ErrLine:
  4647.             Err.Clear
  4648.             Exit Sub
  4649.             End Sub
  4650.             
  4651.           
  4652.             ' ******************************************************************************************************************************
  4653.             ' * procedure name: ctrlCoolBar_OLEDragOver
  4654.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  4655.             ' *
  4656.             ' ******************************************************************************************************************************
  4657.             Private Sub ctrlCoolBar_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  4658.             On Local Error GoTo ErrLine
  4659.             
  4660.             'pass to the application drag over handler
  4661.             Call AppOLEDragOver(Data, Effect, Button, Shift, X, Y, State)
  4662.             Exit Sub
  4663.             
  4664. ErrLine:
  4665.             Err.Clear
  4666.             Exit Sub
  4667.             End Sub
  4668.             
  4669.             
  4670. ' **************************************************************************************************************************************
  4671. ' * PRIVATE INTERFACE- APPLICATION METHODS
  4672.             ' ******************************************************************************************************************************
  4673.             ' * procedure name: AppOLEDragDrop
  4674.             ' * procedure description:  Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual.
  4675.             ' *
  4676.             ' ******************************************************************************************************************************
  4677.             Private Sub AppOLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  4678.             Dim nCount As Long
  4679.             Dim bstrFileName As String
  4680.             Dim objLocalTimeline As AMTimeline
  4681.             On Local Error GoTo ErrLine
  4682.             
  4683.             'assign mouse state
  4684.             Screen.MousePointer = vbHourglass
  4685.             
  4686.             For nCount = 1 To Data.Files.Count
  4687.                   bstrFileName = Data.Files(nCount)
  4688.                   If Len(bstrFileName) > 4 Then
  4689.                         'verify the file extension is valid
  4690.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  4691.                            'at least it's been named an xtl file, proceed to attempt an import..
  4692.                            Set objLocalTimeline = New AMTimeline
  4693.                            Call RestoreTimeline(objLocalTimeline, bstrFileName, DEXImportXTL)
  4694.                            'verify restoration
  4695.                            If Not objLocalTimeline Is Nothing Then
  4696.                               'import succeeded; clean-up application scope
  4697.                               If Not gbl_objTimeline Is Nothing Then
  4698.                                  'dereference & clean-up timeline
  4699.                                  Call ClearTimeline(gbl_objTimeline)
  4700.                                  Set gbl_objTimeline = Nothing
  4701.                                  'dereference & clean-up rendering
  4702.                                 If Not gbl_objQuartzVB Is Nothing Then Call gbl_objQuartzVB.StopGraph
  4703.                                 If Not gbl_objFilterGraph Is Nothing Then Set gbl_objFilterGraph = Nothing
  4704.                                 If Not gbl_objRenderEngine Is Nothing Then Call gbl_objRenderEngine.ScrapIt
  4705.                                 If Not gbl_objRenderEngine Is Nothing Then Set gbl_objRenderEngine = Nothing
  4706.                               End If
  4707.                               'assign the local timeline to global scope
  4708.                               Set gbl_objTimeline = objLocalTimeline
  4709.                               'render the timeline and derive a filter graph manager
  4710.                               Set gbl_objFilterGraph = RenderTimeline(gbl_objTimeline)
  4711.                               'map the timeline to the userinterface
  4712.                               Call GetTimelineDirect(tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
  4713.                               mnuTimeLineClearRenderEngine.Enabled = False
  4714.                               'update the button(s)
  4715.                               With tbMain.Buttons
  4716.                                  .Item("New").Enabled = True
  4717.                                  .Item("Open").Enabled = True
  4718.                                  .Item("Save").Enabled = True
  4719.                                  .Item("Play").Enabled = True
  4720.                                  .Item("Pause").Enabled = False
  4721.                                  .Item("Stop").Enabled = False
  4722.                                  .Item("Rewind").Enabled = False
  4723.                                  .Item("FastForward").Enabled = False
  4724.                                  .Item("SeekForward").Enabled = False
  4725.                                  .Item("SeekBackward").Enabled = False
  4726.                               End With
  4727.                               'update the state on the popup context menu
  4728.                               mnuTimeLinePlay.Enabled = True
  4729.                               mnuTimeLineStop.Enabled = False
  4730.                               mnuTimeLinePause.Enabled = True
  4731.                               mnuTimeLineRenderTimeLine.Enabled = True
  4732.                               mnuTimeLineClearRenderEngine.Enabled = True
  4733.                               'reset module-level filename
  4734.                               gbl_bstrLoadFile = Data.Files(nCount)
  4735.                               'reset the caption on the application's main form
  4736.                               bstrFileName = Mid(bstrFileName, InStrRev(bstrFileName, "\") + 1)
  4737.                               Me.Caption = "DexterVB - " & bstrFileName
  4738.                            End If
  4739.                         End If
  4740.                         'clean-up & dereference
  4741.                         If Not objLocalTimeline Is Nothing Then
  4742.                            Set objLocalTimeline = Nothing
  4743.                            Exit For
  4744.                         End If
  4745.                   End If
  4746.             Next
  4747.             
  4748.             'reassign mouse state
  4749.             Screen.MousePointer = vbDefault
  4750.             Exit Sub
  4751.             
  4752. ErrLine:
  4753.             Err.Clear
  4754.             'reassign mouse state
  4755.             Screen.MousePointer = vbDefault
  4756.             Exit Sub
  4757.             End Sub
  4758.             
  4759.             
  4760.             ' ******************************************************************************************************************************
  4761.             ' * procedure name: AppOLEDragOver
  4762.             ' * procedure description:  Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual.
  4763.             ' *
  4764.             ' ******************************************************************************************************************************
  4765.             Private Sub AppOLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  4766.             Dim nCount As Long
  4767.             Dim bstrFileName As String
  4768.             On Local Error GoTo ErrLine
  4769.             
  4770.             'do not allow drag n' drop operations when rendering..
  4771.             If Not gbl_objQuartzVB Is Nothing Then
  4772.                If gbl_objQuartzVB.State = QTZStatusPlaying Then
  4773.                   Effect = vbDropEffectNone
  4774.                   Exit Sub
  4775.                End If
  4776.             End If
  4777.             
  4778.             For nCount = 1 To Data.Files.Count
  4779.                   bstrFileName = Data.Files(nCount)
  4780.                   If Len(bstrFileName) > 4 Then
  4781.                         'verify the file extension is valid
  4782.                         If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
  4783.                            'at least it's been named an xtl file, proceed to attempt an import..
  4784.                            Effect = vbDropEffectCopy
  4785.                         Else: If Effect <> vbDropEffectNone Then Effect = vbDropEffectNone
  4786.                         End If
  4787.                   End If
  4788.             Next
  4789.             Exit Sub
  4790.             
  4791. ErrLine:
  4792.             Err.Clear
  4793.             Exit Sub
  4794.             End Sub
  4795.